23.03.2013 Views

Quick introduction to reverse engineering for beginners

Quick introduction to reverse engineering for beginners

Quick introduction to reverse engineering for beginners

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.

7.2 SAP client network traffic compression case<br />

(Tracing connection between TDW_NOCOMPRESS SAPGUI 3 environment variable <strong>to</strong> nagging pop-up<br />

window and actual data compression routine.)<br />

It’s known that network traffic between SAPGUI and SAP is not crypted by default, it’s rather compressed<br />

(read here and here).<br />

It’s also known that by setting environment variable TDW_NOCOMPRESS <strong>to</strong> 1, it’s possible <strong>to</strong> turn<br />

network packets compression off.<br />

But you will see a nagging pop-up windows that cannot be closed:<br />

Figure 7.1: Screenshot<br />

Let’s see, if we can remove that window somehow.<br />

But be<strong>for</strong>e this, let’s see what we already know. First: we know that environment variable TDW_NOCOMPRESS<br />

is checked somewhere inside of SAPGUI client. Second: string like “data compression switched off” must be<br />

present somewhere <strong>to</strong>o. With the help of FAR file manager I found that both of these strings are s<strong>to</strong>red in<br />

the SAPguilib.dll file.<br />

So let’s open SAPguilib.dll in IDA 5 and search <strong>for</strong> “TDW_NOCOMPRESS” string. Yes, it is present<br />

and there is only one reference <strong>to</strong> it.<br />

We see the following piece of code (all file offsets are valid <strong>for</strong> SAPGUI 720 win32, SAPguilib.dll file<br />

version 7200,1,0,9009):<br />

.text:6440D51B lea eax, [ebp+2108h+var_211C]<br />

.text:6440D51E push eax ; int<br />

.text:6440D51F push offset aTdw_nocompress ; "TDW_NOCOMPRESS"<br />

.text:6440D524 mov byte ptr [edi+15h], 0<br />

.text:6440D528 call chk_env<br />

.text:6440D52D pop ecx<br />

.text:6440D52E pop ecx<br />

.text:6440D52F push offset byte_64443AF8<br />

.text:6440D534 lea ecx, [ebp+2108h+var_211C]<br />

; demangled name: int ATL::CStringT::Compare(char const *)const<br />

.text:6440D537 call ds:mfc90_1603<br />

3 SAP GUI client<br />

183

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

Saved successfully!

Ooh no, something went wrong!