Flag: Tornado! Hurricane!

 Forums >>  Debuggers  >>  breaking a security mechanism on Windows XP using "WinDBG.exe" debugger

Topic created on: July 1, 2009 13:15 CDT by jeremy28 .

Hi there!

I want to break security on Windows XP(signature checking procedure) and
think a Kernel debugger for Windows would help me!!
For example, when a CSP DLL is being loaded, Windows XP checks if it's
signature is valid (issued by Microsoft) or not!

I want to watch and analyse this procedure through Kernel Debugger to know
how would be possible to hack or break this security mechanism?!!

I would ask you How Could I see this mechanism in "WinDBG.exe"?

Because I'm so new to Windows debugging issue;

I've debugged some VC++ programs with Visual Studio debugger,but I've not
any experience in Windows debugging so far and I'm not so familiar with
Windows Kernel operations;

Is it possible to see this checking procedure in "WinDBG.exe" in Assembly or
any other form?!

I've not read the "WinDBG" documentation yet, because first I'd rather to be
sure of this possibility and also need to experienced people's guidance for
this;

Please help!!

Thanks in Advance.

  lallous     July 2, 2009 02:29.07 CDT
In general, using a debugger and depending on the target (user mode or kernel mode), you can understand and locate the code in question.
So to answer you, you can use Windbg if you desire.
How you could see this mechanism in windbg?
The answer is the same for all different reversing tasks. You have to reverse and debug until you locate what you're looking for.

  nezumi     July 6, 2009 08:16.30 CDT
jeremy28
> I want to break security on Windows XP
> (signature checking procedure) (1)
> and think a Kernel debugger for Windows would help me!!
> For example, when a CSP DLL is being loaded, (2)
> Windows XP checks if it's signature is valid (issued by Microsoft)
a driver has a digital signature, dll has a certificate, if you're talking about signatures (1), it means you're talking about drivers. if you're talking about DLLs (2), you actually keep certifications in your mind.

debugger (particularly the kernel one) is the last resort, especially if you have no idea how the system works and what you actually look for. so, the question is: what we're looking for. ok, here we go. you don't know what the certificate is obviously, but it something that's stored inside DLL, right? and DLL is PE file, so go to Google and type "MS PE Specification". it's free. download it, read it and find out that there is a Certificate Table and Certificate API, implemented in Imagehlp.dll. for example, ImageRemoveCertificate removes the specified certificate from the given file. is this what you're looking for?

guess, not. you want to patch the kernel, right? well, download pdb files for KERNEL32.DLL, NTDLL.DLL (and possibly for ntoskrnl.exe) and look for any "cert" strings ("cert", not "certificate", because MS uses the short form, how did I know it? well, just intuition :-). whatever, you are going to find a lot of references.

btw, maybe you will be interested in http://www.symantec.com/avcenter/reference/Windows_Vista_Kernel_Mode_Security.pdf

> I want to watch and analyse this procedure
"this procedure" sounds like you have done 99% of your job. what is "this procedure"?! of course, you can start to debug "LoadLibraryA", but... it's not easy to find where the security checks are actually performed. of course, you can set break points on the certificate section or perform memory search and set break points where you will find the content... but... anyway, before to do it, you have to get the full view. so, reading specifications and disassembling dlls is the shorter way. and only when you will have found the procedure you looked for - it's worth to ask for debugger.

> through Kernel Debugger to know
user-level works fine.

> how would be possible to hack or break this security mechanism?!!
um, maybe before break something better to try to use it? :-) I mean to read specifications and learn the legal tools provided by ms to work with certificates?

> I would ask you How Could I see this mechanism in "WinDBG.exe"?
> Because I'm so new to Windows debugging issue;
the rule of debugging: if you don't know how to find something with debugger, don't use it. and don't forget about reading manuals :-)

> Is it possible to see this checking procedure in "WinDBG.exe"
> in Assembly or any other form?!
do you prefer source-level? well, download wine :-)

> I've not read the "WinDBG" documentation yet, because
> first I'd rather to be sure of this possibility and also need to
> experienced people's guidance for this;
_everything_, I mean _everything_ could be broken, disabled or bypassing. and quite often there is a legal way to do it. not necessary to be a hacker to read manuals :-) just try to understand - WinDBG is just a wheel and your brain is an engine. forgot about debuggers, use your brain, man! the first step of hacking is to find a way how to do it, and the second way is to pick up the appropriate tools. having a brain you will hack the security checks even with HIEW.

WinDBG is not rune-staff nor divining-rod...

Note: Registration is required to post to the forums.

There are 28,212 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
Ludwig
Feb/04
chi on sale

Ludwig
Feb/04
Monster In The Vicinity Of ...

Ludwig
Feb/04
Supra footwear Online

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

More ...


Recent Blog Comments
waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

NirIzr on:
Jan/31
Yet Another Anti-Debug Trick

jackchen on:
Jan/10
nike mercurial vapor iii

waleedassar on:
Dec/27
A new Anti-Olly trick.

PeterFerrie on:
Dec/27
A new Anti-Olly trick.

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit