25.12.2014 Views

Analysis and Evaluation of the Windows Event Log - Bill Buchanan

Analysis and Evaluation of the Windows Event Log - Bill Buchanan

Analysis and Evaluation of the Windows Event Log - Bill Buchanan

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.

Barrie Codona, BSc (Hons) Network Computing, 2007<br />

The data Archiving System listens for a connection using port 13000, after a<br />

connection has been established it generates a r<strong>and</strong>om RSA key pair, one public <strong>and</strong><br />

one private key. The public key is sent to <strong>the</strong> client machine <strong>and</strong> <strong>the</strong> private key is<br />

kept <strong>and</strong> used for decrypting all <strong>the</strong> data that is sent to it. The data received is <strong>the</strong>n<br />

saved to disk. It continues this process until <strong>the</strong> client application disconnects, Figure<br />

14 shows this.<br />

Listen for connections on port 13000<br />

If client connects<br />

{<br />

Generate new RSA key pair<br />

Send public key to client<br />

While Client is still connected<br />

{<br />

Listen for messages<br />

Decrypt Message with private key<br />

Time stamp incoming message<br />

Write message to file<br />

}<br />

}<br />

Figure 14: Server side pseudo code<br />

4.6.3 <strong>Event</strong> Viewer Pseudo Code<br />

Figure 15 shows <strong>the</strong> pseudo code for <strong>the</strong> event viewer, initially it reads <strong>the</strong> contents <strong>of</strong><br />

<strong>the</strong> event log into an array as a complete XML string. It <strong>the</strong>n extracts <strong>the</strong> information<br />

from <strong>the</strong> XML string as it needs it. Based up <strong>the</strong> HMAC key that has been entered by<br />

<strong>the</strong> user, it also calculates what <strong>the</strong> HMAC value should be for that particular XML<br />

string <strong>and</strong> informs <strong>the</strong> user if it matches <strong>the</strong> HMAC signature that is contained within<br />

<strong>the</strong> XML string.<br />

Read <strong>Event</strong> <strong>Log</strong> File into Array<br />

Extract data from XML tags <strong>and</strong> populate fields<br />

If user clicks ‘next’ or ‘previous’<br />

{<br />

Display next or previous event accordingly<br />

Calculate checksum based on inputted key<br />

}<br />

Figure 15: <strong>Event</strong> viewer pseudo code<br />

37

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

Saved successfully!

Ooh no, something went wrong!