1. Rebooting Results in Degraded RAID Array Using Debian Lenny

    Wed 24 December 2008

    As described earlier, I setup a RAID 6 array consisting of physical 1 TB disk and 'virtual' 1 TB disks that are in fact two 0.5 TB disks in RAID 0. 

    I wanted to upgrade to Lenny because the new kernel that ships with Lenny supports growing a RAID 6 array. After installing Lenny the RAID 0 devices were running smootly, but not recognised as part of the RAID 6. 

    So the array was running in degraded mode. That is bad.

    In Lenny, a new version of mdadm is used that requires the presense of the mdadm.conf file. The mdadm.conf file contains these lines: 

    #DEVICE partitions
    #DEVICE /dev/md*
    

    After I uncommented the "DEVICE /dev/md*" line and generated a new initramfs file with:

    update-initramfs -u
    

    The RAID 0 drives were recognised as part of a RAID array and everything was OK again. So mdadm must be instructed to check if /dev/md? devices are a member of a RAID array. 

    I guess this is also relevant if you are running a RAID 10 based on a mirrored stripe or a striped mirror.

    Tagged as : Uncategorized
  2. Calculating EXT2 EXT3 EXT4 Stride Size When Using RAID

    Sat 20 December 2008

    When formatting a RAID device with an EXT filesystem, it is always advised to specify a stride size. The format utility will take this stride size into account when formatting a device. The stride size is the number you get when you divide the 'chunck' size, as specified with MDADM by the filesystem block size (almost always 4K).

    So a 128 KB chunck size gives you a stride of 32. A nice and simple utility to calculate your stride can be found here:

    http://busybox.net/~aldot/mkfs_stride.html

    Please note that the stripe-with option does not seem to work on Debian Etch. Maybe because that option is too old or too new.

    I also think that most recent tools automatically detect and calculate the correct stride size for you.

    Tagged as : Uncategorized
  3. Did You Know That RDP Is as Insecure as Telnet?

    Fri 21 November 2008

    Microsoft developed the remote desktop protocol in order to allow remote GUI- based access to hosts. It is easy to pick on Microsoft and I do respect what they have accomplished, however, it may not come as a surprise that they did it all wrong with RDP in terms of security.

    By default, out-of-the-box, a server or desktop supports RDP with RC4 encryption. Most recent servers and clients support 128-bits encryption. Sounds secure, right? Well, it isn't unfortunately. There are two major security weaknesses that affect the remote desktop protocol.

    1. Keystroke vulnerability

    The original , RDP version 4.0, is based on the T.128 protocol. Input events, such as keystrokes, are sent to the server with a unique timestamp as specified in the T.128 standard. This means that each message containing an input event is unique and so will be the checksum generated from this input event data. In other words: if two RDP messages contain the same data, they will still be unique because of the timestamp. Microsoft did it right in RDP version 4.0, but there was one drawback: the timestamp generated overhead, making RDP messages relatively large.

    So in RDP version 5.0, Microsoft decided to drop the timestamp. Thus, if two RDP messages contain the same data, their checksum will be identical. So if the same key is pressed twice, the two packets that are generated will contain different encrypted data segments but the checksums will be identical. Although it is not clear which key is pressed, if a larger data set is analyzed, patterns can be discovered and an accurate guess can be made to wich keys are pressed.

    In a nuttshell an attacker that has access to the data stream of an RDP session will be able to decode keystrokes and thus be able to:

    • obtain your username and password, allowing access to the system!

    • read what you type.

    Please visit the following location as it provides a more detailed explanation of this vulnerability:

    http://www.xatrix.org/article.php?s=1943

    1. Man-in-the-middle-attack

    At first, back in 2003, RDP-clients did not verify the identity of the RDP server. So an attacker can easily spoof an identity and perform a man-in-the- middle-attack. Microsoft attempted to fix this vulnerability but did not succeed. Although more recent RDP-clients do verify the identify of the server, it is still possible to spoof this identity. Microsoft uses a fixed hard-coded key to identify the server with. This key resided in a system DLL that is available to the general public. An attacker can easily obtain this key, create a fake identity and still prove to be legitimate since the identity is signed with a trusted key.

    More detailed information:

    http://www.oxid.it/downloads/rdp-gbu.pdf

    Conclusion

    Given these vulnerabilities, RDP is, in its default configuration, virtually as insecure as plain old telnet. Think about that the next time you logon with administrator credentials using RDP.

    Tool that implements the attacks

    The well-known hack-tool Cain & Abel has a build-in RDP man-in-the-midlle implementation. It automatically decrypts (parts of) RDP data packets and reveals the key strokes that are send to a server. So if you don't believe this story and just want to see for yourself how easy such an attack really is, download this tool and test it for yourself.

    To defend against the attacks

    To protect against this attack, it is strongly advised to implement RDP based on TLS/SSL encryption. Ofcourse, you'll have to install a server-side SSL- certificate and it may be necessary to obtain an official (as in not self-) signed certificate.

    http://technet2.microsoft.com/windowsserver/en/library/a92d8eb9-f53d-4e86-ac9b-29fd6146977b1033.mspx?mfr=true

    So please understand the risks of using RDP, especially over the Internet. If TLS is for some reason not an option, use an encrypted VPN-connection to tunnel the RDP-session in, as an added layer of protection. Never use RDP in its default configuration over the interne without additional protection.

    EDIT: IN RDP version 6.0 the man-in-the-middle-attack is no longer possible!

    EDIT2: Configure your terminal server to use FIPS compliant encryption. It will use Triple DES encryption even if TLS is not enabled.

    After you enable this setting on a Windows Server 2003-based computer, the following is true:

    • The RDP channel is encrypted by using the 3DES algorithm in Cipher Block Chaining (CBC) mode with a 168-bit key length.

    • The SHA-1 algorithm is used to create message digests.

    • Clients must use the RDP 5.2 client program or a later version to connect.

    So you don't need to use TLS if you want to use a more secure algorithm than RC4.

    4e86-ac9b-29fd6146977b1033.mspx?mfr=true

    Tagged as : Uncategorized

Page 21 / 23