<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title><![CDATA[Dobrica Pavlinušić's random unstructured stuff: Dell RAC]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?dell_rac</link>
<description></description>
<pubDate>Sun, 17 Jan 2010 11:14:39 -0000</pubDate>
<webMaster>root@saturn.ffzg.hr</webMaster>
<generator>Socialtext Workspace v2.19.0.2</generator>

<item>
<title><![CDATA[Dell RAC]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?dell_rac</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: Dell</div><hr/><div class="wiki">
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/auth.txt?action=attachments_download;page_name=dell_rac;id=20100117111439-0-8759">auth.txt</a><!-- wiki: {file: auth.txt} --></span><br /><br /><ul>
<li>create ceritifcates <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/cert.sh?action=attachments_download;page_name=dell_rac;id=20100106154340-0-16100">cert.sh</a><!-- wiki: {file: cert.sh} --></span></li>
<li>install debian tools <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/mitm-install.sh?action=attachments_download;page_name=dell_rac;id=20100106154318-0-6922">mitm-install.sh</a><!-- wiki: {file: mitm-=install.sh} --></span></li>
</ul>
<h1 id="dell_s_documentation">Dell's documentation</h1>
<ul>
<li><span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/DellRemoteAccessController5Security.Pdf?action=attachments_download;page_name=dell_rac;id=20100101141633-0-6206">DellRemoteAccessController5Security.Pdf</a><!-- wiki: {file: DellRemoteAccessController5Security.Pdf} --></span></li>
<li><span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/DellRemoteAccessController4Security.Pdf?action=attachments_download;page_name=dell_rac;id=20100101141610-1-2373">DellRemoteAccessController4Security.Pdf</a><!-- wiki: {file: DellRemoteAccessController4Security.Pdf} --></span></li>
</ul>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#dell_s_documentation">Dobrica Pavlinušić's random unstructured stuff (Dell's documentation)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Dell's documentation} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#hardware">Dobrica Pavlinušić's random unstructured stuff (Hardware)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Hardware} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#proprietary_ports">Dobrica Pavlinušić's random unstructured stuff (Proprietary ports)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Proprietary ports} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#supported_ssl_cipher_suites">Dobrica Pavlinušić's random unstructured stuff (Supported SSL Cipher Suites)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Supported SSL Cipher Suites} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ipmi_rmcp_encryption">Dobrica Pavlinušić's random unstructured stuff (IPMI RMCP+ Encryption)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] IPMI RMCP+ Encryption} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#console_redirection_security">Dobrica Pavlinušić's random unstructured stuff (Console Redirection Security)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Console Redirection Security} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#authentication_and_encryption">Dobrica Pavlinušić's random unstructured stuff (Authentication and Encryption)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Authentication and Encryption} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#video_redirection">Dobrica Pavlinušić's random unstructured stuff (Video redirection)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Video redirection} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ssl_man_in_the_middle">Dobrica Pavlinušić's random unstructured stuff (SSL man in the middle)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] SSL man in the middle} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#video_adjust">Dobrica Pavlinušić's random unstructured stuff (Video adjust)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Video adjust} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#keyboard_redirection_protocol_5900">Dobrica Pavlinušić's random unstructured stuff (Keyboard redirection protocol 5900)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Keyboard redirection protocol 5900} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#mouse">Dobrica Pavlinušić's random unstructured stuff (mouse)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] mouse} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#keyboard">Dobrica Pavlinušić's random unstructured stuff (keyboard)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] keyboard} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#virtual_media_3668">Dobrica Pavlinušić's random unstructured stuff (Virtual media 3668)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Virtual media 3668} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><p>
I will try to collect useful protocol information about Dell's (actually &quot;&quot;&lt;&gt;) RAC protocol</p>
<p>
My main goal is to use Dell RAC from Linux, without all troubles described in <a target="_blank" title="(external link)" href="http://blog.rot13.org/2009/12/dells_rac_support_under_linux_drek.html">my blog post<!-- wiki-renamed-hyperlink "my blog post"<http://blog.rot13.org/2009/12/dells_rac_support_under_linux_drek.html> --></a></p>
<h1 id="hardware">Hardware</h1>
<p>
According to <a target="_blank" title="(external link)" href="http://www.dell.com/downloads/global/power/ps3q06-20060118-McGary.pdf">Exploring the DRAC5<!-- wiki-renamed-hyperlink "Exploring the DRAC5"<http://www.dell.com/downloads/global/power/ps3q06=-20060118=-McGary.pdf> --></a>:</p>
<ul>
<li>AMD Alchemy Au1550 333 MHz processor</li>
<li>Virtual media performance with up to 1.5 MB/sec transfer speeds</li>
<li>Data storage through remote and local 16 MB USB keys</li>
<li>Improved maximum supported screen resolution 1280*1024</li>
</ul>
<h1 id="proprietary_ports">Proprietary ports</h1>
<table style="border-collapse: collapse;" class="formatter_table">
<tr>
<td style="border: 1px solid black;padding: .2em;">Port</td>
<td style="border: 1px solid black;padding: .2em;">Protocol</td>
<td style="border: 1px solid black;padding: .2em;">Type</td>
<td style="border: 1px solid black;padding: .2em;">Ver</td>
<td style="border: 1px solid black;padding: .2em;">Enc</td>
<td style="border: 1px solid black;padding: .2em;">Direction</td>
<td style="border: 1px solid black;padding: .2em;">Usage</td>
<td style="border: 1px solid black;padding: .2em;">Configurable</td>
</tr>
<tr>
<td style="border: 1px solid black;padding: .2em;">3668</td>
<td style="border: 1px solid black;padding: .2em;">Proprietary</td>
<td style="border: 1px solid black;padding: .2em;">TCP</td>
<td style="border: 1px solid black;padding: .2em;">1.0</td>
<td style="border: 1px solid black;padding: .2em;">None</td>
<td style="border: 1px solid black;padding: .2em;">In/Out</td>
<td style="border: 1px solid black;padding: .2em;">CD/diskette virtual media service</td>
<td style="border: 1px solid black;padding: .2em;">Yes</td>
</tr>
<tr>
<td style="border: 1px solid black;padding: .2em;">3669</td>
<td style="border: 1px solid black;padding: .2em;">Proprietary</td>
<td style="border: 1px solid black;padding: .2em;">TCP</td>
<td style="border: 1px solid black;padding: .2em;">1.0</td>
<td style="border: 1px solid black;padding: .2em;">128-bit SSL</td>
<td style="border: 1px solid black;padding: .2em;">In/Out</td>
<td style="border: 1px solid black;padding: .2em;">CD/diskette virtual media service</td>
<td style="border: 1px solid black;padding: .2em;">Yes</td>
</tr>
<tr>
<td style="border: 1px solid black;padding: .2em;">5900</td>
<td style="border: 1px solid black;padding: .2em;">Proprietary</td>
<td style="border: 1px solid black;padding: .2em;">TCP</td>
<td style="border: 1px solid black;padding: .2em;">1.0</td>
<td style="border: 1px solid black;padding: .2em;">128-bit SSL</td>
<td style="border: 1px solid black;padding: .2em;">In/Out</td>
<td style="border: 1px solid black;padding: .2em;">Video redirection</td>
<td style="border: 1px solid black;padding: .2em;">Yes</td>
</tr>
<tr>
<td style="border: 1px solid black;padding: .2em;">5901</td>
<td style="border: 1px solid black;padding: .2em;">Proprietary</td>
<td style="border: 1px solid black;padding: .2em;">TCP</td>
<td style="border: 1px solid black;padding: .2em;">1.0</td>
<td style="border: 1px solid black;padding: .2em;">128-bit SSL</td>
<td style="border: 1px solid black;padding: .2em;">In/Out</td>
<td style="border: 1px solid black;padding: .2em;">Keyboard/Mouse redirection</td>
<td style="border: 1px solid black;padding: .2em;">Yes</td>
</tr>
</table>
<br /><h1 id="supported_ssl_cipher_suites">Supported SSL Cipher Suites</h1>
<p>
DRAC 5 supports SSL version 3 and TLS version 1.0. The following are ciphers supported on DRAC 5:</p>
<ul>
<li>SSL_RSA_WITH_RC4_128_MD5</li>
<li>SSL_RSA_WITH_RC4_128_SHA</li>
<li>SSL_RSA_WITH_3DES_EDE_CBC_SHA</li>
<li>SSL_RSA_WITH_3DES_EDE_CBC_MD5</li>
<li>TLS_RSA_WITH_AES_128_CBC_SHA</li>
<li>TLS_RSA_WITH_AES_256_CBC_SHA</li>
</ul>
<h1 id="ipmi_rmcp_encryption">IPMI RMCP+ Encryption</h1>
<p>
DRAC 5 IPMI over LAN and SOL use RMCP+ for Authentication and Key exchange. For details on the RMCP+ protocol, see the IPMI 2.0 specification.</p>
<p>
DRAC 5 IPMI supports the following encryption algorithms:</p>
<ul>
<li>AES-CBC-128 (128-bit AES with CBC)</li>
<li>RC4-128 (128-bit RC4)</li>
</ul>
<h1 id="console_redirection_security">Console Redirection Security</h1>
<h2 id="authentication_and_encryption">Authentication and Encryption</h2>
<p>
DRAC 5 can continuously redirect the managed system's video, keyboard and mouse (KVM) to the management station. It is a very powerful feature, is very easy to use, and does not require any software installation on the managed system. A user can access this feature to remotely manage the system as if they were sitting in front of the system. A security authentication and encryption protocol has been implemented in console redirection to prevent a hostile, rogue client from breaking into the console redirect path without authenticating though the web server. 128-bit SSL encryption secures the keyboard keystrokes during the remote console redirection and therefore does not allow unauthorized &quot;snooping&quot; of the network traffic. The following sequence of security protocol operations is performed during the establishment of a console redirection session:</p>
<ol>
<li>A user logs into the main web GUI then clicks the &quot;Open Consoles&quot; tab.</li>
</ol>
<ol>
<li>The Web GUI sends a pre-authentication request to the DRAC 5 web server via the HTTPS channel (SSL encrypted).</li>
</ol>
<ol>
<li>The DRAC 5 web server returns a set of secret data (including an encryption key) via the SSL channel. The console redirection authentication key (32 bytes long) is dynamically generated to prevent replay attack.</li>
</ol>
<ol>
<li>The Console redirection client sends a login command with an authentication key to a console redirection server keyboard/mouse port for authentication via SSL channel.</li>
</ol>
<ol>
<li>If authentication is successful, a console redirection session and two console redirection pipes (one for keyboard/mouse and one for video) are established. The keyboard/mouse pipe is always SSL encrypted. The video pipe encryption is optional. (Users can choose to encrypt or not to encrypt the video pipe before they start their console redirection session).</li>
</ol>
<h1 id="video_redirection">Video redirection</h1>
<pre>
root@klin:~# ssldump -r /tmp/rac_t1.pcap 
New TCP connection #1: klin.local(52028) &lt;-&gt; 10.60.0.102(5900)
1 1  0.0148 (0.0148)  C&gt;S  Handshake
      ClientHello
        Version 3.0 
        cipher suites
        SSL_RSA_WITH_RC4_128_MD5
        SSL_RSA_WITH_3DES_EDE_CBC_SHA
        SSL_RSA_WITH_DES_CBC_SHA
        compression methods
                  NULL
1 2  0.0165 (0.0016)  S&gt;C  Handshake
      ServerHello
        Version 3.0 
        session_id[0]=

        cipherSuite         SSL_RSA_WITH_RC4_128_MD5
        compressionMethod                   NULL
</pre>
<br /><h2 id="ssl_man_in_the_middle">SSL man in the middle</h2>
<p>
First, we need a really old distribution to support cipher suites. <a target="_blank" title="(external link)" href="http://www.debian.org/distrib/archive">http://www.debian.org/distrib/archive</a></p>
<p>
openssl versions:</p>
<ul>
<li>potato - 0.9.4-5 - includes just sslv2, so it's too old</li>
<li>woody - 0.9.6c-2.woody.7</li>
</ul>
<pre>
sudo debootstrap --arch i386 woody woody http://archive.debian.org/debian-archive/debian
sudo chroot woody
</pre>
<br /><pre>
# /etc/apt/sources.list
deb http://archive.debian.org/debian-archive/debian potato main non-free contrib
deb http://archive.debian.org/debian-non-US/ potato/non-US main contrib non-free
</pre>
<br /><pre>
apt-get install stunnel

openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem

# https mitm
stunnel -p cert.pem -d 443 -r 5443
stunnel -c -d 5443 -r 10.60.0.100:443

# 5900 mitm
stunnel -p cert.pem -d 5900 -r 5999
stunnel -c -d 5999 -r 10.60.0.100:5900
</pre>
<br /><p>
Check ssl connection</p>
<pre>
ssldump -i eth0 'port 5900' -A -N
</pre>
<br /><p>
Following is <strong>bad</strong></p>
<pre>
2 2  0.0489 (0.0000)  S&gt;CV3.0(2)  Alert
    level           fatal
    value           handshake_failure
</pre>
<br /><p>
Dump unencrypted communication</p>
<pre>
sudo tshark -w /tmp/5900-plain.pcap 'port 5999'
</pre>
<br /><p>
5900 and 5901 traffic with two keystrokes:</p>
<span class="nlw_phrase"><img alt="drac-traffic.png" src="https://saturn.ffzg.hr/rot13/index.cgi/drac-traffic.png?action=attachments_download;page_name=dell_rac;id=20100106164956-1-6922" /><!-- wiki: {image: drac-=traffic.png} --></span><br /><br /><ul>
<li><a target="_blank" title="(external link)" href="http://svn.rot13.org/index.cgi/scripts/view/trunk/mitm-ssl.pl">http://svn.rot13.org/index.cgi/scripts/view/trunk/mitm-ssl.pl</a></li>
</ul>
<p>
Dump all traffic:</p>
<ul>
<li>5999 - unencrypted 5900</li>
<li>5443 - unencrypted 443 (https)</li>
<li>5901 - just port redir</li>
</ul>
<pre>
sudo tshark -w /tmp/590x-3.pcap -i any 'port 5999 or port 5901 or port 5443'
</pre>
<br /><pre>
# create client certificate
openssl req -new -x509 -days 365 -nodes -out ssl.cert -keyout ssl.key

root@opr:~/rac-ssl# ./mitm-ssl.pl --lport 5900 --laddr 10.60.0.91 --rport 5900 --raddr 10.60.0.100 --serverkey ssl.key --servercert ssl.cert

root@opr:~/rac-ssl# ./mitm-ssl.pl --lport 443 --laddr 10.60.0.91 --rport 443 --raddr 10.60.0.100 --serverkey ssl.key --servercert ssl.cert
</pre>
<br /><h1 id="video_adjust">Video adjust</h1>
<ul>
<li>PS - Pixel sampling 00 - f0</li>
</ul>
<pre>
# 0                                           PS
S&gt;C 42454546 82020020 0080005a 0f42001b 04200000 03200258 00000002 00000000 
C&gt;S 42454546 03090010 00080000 00000000 
C&gt;S 42454546 03000010 00000000 00000000 
# 10
S&gt;C 42454546 82020020 0080005a 0f42001b 04200050 03200258 00000002 00000000 
C&gt;S 42454546 03090010 00500000 00000000 
C&gt;S 42454546 03000010 00000000 00000000 
# 30
S&gt;C 42454546 82020020 0080005a 0f42001b 042000f0 03200258 00000002 00000000 
C&gt;S 42454546 03090010 00f00000 00000000 
</pre>
<br /><ul>
<li>HORI - Horizontal position</li>
</ul>
<pre>
# 0                            HORI
S&gt;C 42454546 82020020 0080005a 0e74001b 042000f0 03200258 00000002 00000000 
C&gt;S 42454546 04000010 00000000 00000000 
# ~100
S&gt;C 42454546 82020020 0080005a 0eda001b 042000f0 03200258 00000002 00000000 
C&gt;S 42454546 04000010 00000000 00000000 
# 100
S&gt;C 42454546 82020020 0080005a 0ed8001b 042000f0 03200258 00000002 00000000 
C&gt;S 42454546 04000010 00000000 00000000 
# 200
S&gt;C 42454546 82020020 0080005a 0f3c001b 042000f0 03200258 00000002 00000000
# 400
S&gt;C 42454546 82020020 0080005a 1004001b 042000f0 03200258 00000002 00000000
</pre>
<br /><ul>
<li>VERT - Vertical position</li>
</ul>
<pre>
# 0                            VERT
42454546 82020020 0080005a 1004000a 042000f0 03200258 00000002 00000000
# 10
42454546 82020020 0080005a 1004001e 042000f0 03200258 00000002 00000000
# 40
42454546 82020020 0080005a 10040032 042000f0 03200258 00000002 00000000
</pre>
<br /><ul>
<li>CO - Contrast</li>
</ul>
<pre>
# 0                     CO
42454546 82020020 00800000 10040032 042000f0 03200258 00000002 00000000
# 255
42454546 82020020 008000ff 10040032 042000f0 03200258 00000002 00000000
</pre>
<br /><h1 id="keyboard_redirection_protocol_5900">Keyboard redirection protocol 5900</h1>
<h2 id="mouse">mouse</h2>
<pre>
# top-left               x    y
42454546 02010010 0000 000c 0008 0000
# bottom-right
42454546 02010010 0000 0282 0383 0000
# mouse click in the middle of screen
42454546 02010010 0001 018a 0147 0000
</pre>
<br /><h2 id="keyboard">keyboard</h2>
<pre>
# a b c d ...         down
C&gt;S 42454546 02000010 00010004 00000000 
C&gt;S 42454546 02000010 00000005 00000000 
C&gt;S 42454546 02000010 00010005 00000000 
C&gt;S 42454546 02000010 00000006 00000000 
C&gt;S 42454546 02000010 00010006 00000000 
C&gt;S 42454546 02000010 00000007 00000000 
C&gt;S 42454546 02000010 00010007 00000000 
</pre>
<br /><h1 id="virtual_media_3668">Virtual media 3668</h1>
<pre>
sudo tshark -w /tmp/drac-vmedia.pcap -i any 'port 5443 or port 3668'
</pre>
</div>
<hr/><div>Attachments: auth.txt, cert.sh, DellRemoteAccessController4Security.Pdf, DellRemoteAccessController5Security.Pdf, drac-traffic.png, mitm-install.sh</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>Dell</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?dell_rac</guid>
<pubDate>Sun, 17 Jan 2010 11:14:39 -0000</pubDate>
</item>
</channel>
</rss>