15.12.2012 Views

Digital Imaging and Communications in Medicine (DICOM)

Digital Imaging and Communications in Medicine (DICOM)

Digital Imaging and Communications in Medicine (DICOM)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

11.1 <strong>DICOM</strong> Hack<strong>in</strong>g 247<br />

Chapter 11<br />

<strong>DICOM</strong> Security<br />

In the <strong>in</strong>nocent era of the 1980s, when <strong>DICOM</strong> was first <strong>in</strong>troduced, no one<br />

was really concerned with network<strong>in</strong>g security or data protection. Those play<strong>in</strong>g<br />

Space Invaders at the time would never imag<strong>in</strong>e that their own data <strong>and</strong> privacy<br />

would be <strong>in</strong>vaded a decade later on a much more magnanimous scale. The<br />

sheer complexity of <strong>DICOM</strong> encod<strong>in</strong>g methods has become the only <strong>DICOM</strong><br />

data protection for nearly 20 years. However, this was hardly enough to block<br />

even the least advanced threats.<br />

11.1<br />

<strong>DICOM</strong> Hack<strong>in</strong>g<br />

Let’s look <strong>in</strong>side a <strong>DICOM</strong> file with some generic file viewer such as WordPad,<br />

Notepad, or Word. When you open a <strong>DICOM</strong> file <strong>in</strong> WordPad (Fig. 77), you do<br />

not expect to see any images or nicely formatted study <strong>in</strong>formation; WordPad<br />

has no idea what to do with the <strong>DICOM</strong> format. What you will see <strong>in</strong>stead will<br />

be mostly unreadable symbols correspond<strong>in</strong>g to the b<strong>in</strong>ary (hexadecimal) contents<br />

of the file. However, look closely <strong>and</strong> you will see very valuable pieces of<br />

<strong>DICOM</strong> <strong>in</strong>formation <strong>and</strong> structure.<br />

1. Symbols from 129 to 132 <strong>in</strong> a valid <strong>DICOM</strong> 3.0 file should read “DICM” (see<br />

Chap. 10). You can open a file, <strong>and</strong> search it for DICM. If you f<strong>in</strong>d it somewhere<br />

<strong>in</strong> the beg<strong>in</strong>n<strong>in</strong>g, it is a good <strong>in</strong>dication that you are look<strong>in</strong>g at a<br />

valid <strong>DICOM</strong> file. In fact, this is probably one of the best ways to recognize<br />

a valid <strong>DICOM</strong> file. Older <strong>DICOM</strong> versions might not have this, but they<br />

are becom<strong>in</strong>g rarer.<br />

2. The “1.2.840…” prefix is used <strong>in</strong> all st<strong>and</strong>ard <strong>DICOM</strong> identifier (UID) str<strong>in</strong>gs,<br />

<strong>and</strong> its presence <strong>in</strong> a file confirms that we are deal<strong>in</strong>g with <strong>DICOM</strong>. Often,<br />

<strong>DICOM</strong> files are named after their image UIDs, <strong>in</strong> which case, <strong>DICOM</strong> file<br />

names beg<strong>in</strong> with the same prefix.<br />

3. <strong>DICOM</strong> dates follow the YYYYMMDD format <strong>and</strong> can be easily identified as<br />

such.<br />

4. Other str<strong>in</strong>gs such as patient <strong>and</strong> physician names, hospital, study, <strong>and</strong> series<br />

description can always be guessed based on their contents. In particular, the<br />

caret (^) character, used <strong>in</strong> <strong>DICOM</strong> as a name separator, helps to locate<br />

names.<br />

Thus, even without help from any <strong>DICOM</strong> software, one can easily <strong>in</strong>terpret<br />

the textual part of a b<strong>in</strong>ary <strong>DICOM</strong> file. 34 The good news is that this often helps<br />

34 The same is true for the older ACR-NEMA files; see the example <strong>in</strong> 5.2.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!