[quote author=pizza1337 link=topic=5421.msg28109#msg28109 A first chance exception of type 'System.IO.IOException' occured in system.dll
the program'(3396) consoleapplicatioin1.exe: managed' has exited with code 0 (0x0).
[/quote]
Why don't you try running a debugger in the background and attach to the process to find out whether or not you can do anything with it:
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000000 ebx=00000001 ecx=77529bac edx=0013ed04 esi=0013ef1c edi=00000001
eip=00c583a6 esp=0013ece4 ebp=ffffffff iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\IBM\XXXXXXXX\SomethingWasHere.dll -
SomethingWasHere+0x83a6:
00c583a6 8b10 mov edx,dword ptr [eax] ds:0023:00000000=????????
0:000> g
(4b74.4b54): Access violation - code c0000005 (!!! second chance !!!)
eax=00000000 ebx=00000001 ecx=77529bac edx=0013ed04 esi=0013ef1c edi=00000001
eip=00c583a6 esp=0013ece4 ebp=ffffffff iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
SomethingWasHere+0x83a6:
00c583a6 8b10 mov edx,dword ptr [eax] ds:0023:00000000=????????
0:000> !exploitable -v
HostMachine\HostUser
Executing Processor Architecture is x86
Debuggee is in User Mode
Debuggee is a live user mode debugging session on the local machine
Event Type: Exception
Exception Faulting Address: 0x0
Second Chance Exception Type: STATUS_ACCESS_VIOLATION (0xC0000005)
Exception Sub-Type: Read Access Violation
Faulting Instruction:00c583a6 mov edx,dword ptr [eax]
Basic Block:
00c583a6 mov edx,dword ptr [eax]
Tainted Input Operands: eax
00c583a8 mov edx,dword ptr [edx+10h]
Tainted Input Operands: edx
00c583ab lea ecx,[esi+4]
00c583ae push ecx
00c583af push eax
Tainted Input Operands: eax
00c583b0 call edx
Tainted Input Operands: edx, StackContents
Exception Hash (Major/Minor): 0x10163335.0x10634435
Stack Trace:
SomethingWasHere+0x83a6
SomethingWasHere+0xaeb8
Instruction Address: 0x0000000000c583a6
Description: Data from Faulting Address controls Code Flow
Short Description: TaintedDataControlsCodeFlow
Exploitability Classification: PROBABLY_EXPLOITABLE
Recommended Bug Title: Probably Exploitable - Data from Faulting Address controls Code Flow starting at SomethingWasHere+0x00000000000083a6 (Hash=0x10163335.0x10634435)
The data from the faulting address is later used as the target for a branch.
0:000> g
(4b74.4b54): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000000 ebx=00000001 ecx=77529bac edx=0013ed04 esi=0013ef1c edi=00000001
eip=00c583a6 esp=0013ece4 ebp=ffffffff iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
SomethingWasHere+0x83a6:
00c583a6 8b10 mov edx,dword ptr [eax] ds:0023:00000000=????????
0:000> r eax=deadbabe
0:000> g
(4b74.4b54): Access violation - code c0000005 (!!! second chance !!!)
eax=00000000 ebx=00000001 ecx=77529bac edx=0013ed04 esi=0013ef1c edi=00000001
eip=00c583a6 esp=0013ece4 ebp=ffffffff iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
SomethingWasHere+0x83a6:
00c583a6 8b10 mov edx,dword ptr [eax] ds:0023:00000000=????????
0:000> r eax=deadbabe
0:000> g
(4b74.4b54): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=deadbabe ebx=00000001 ecx=77529bac edx=0013ed04 esi=0013ef1c edi=00000001
eip=00c583a6 esp=0013ece4 ebp=ffffffff iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
SomethingWasHere+0x83a6:
00c583a6 8b10 mov edx,dword ptr [eax] ds:0023:deadbabe=????????
0:000> g
(4b74.4b54): Access violation - code c0000005 (!!! second chance !!!)
eax=deadbabe ebx=00000001 ecx=77529bac edx=0013ed04 esi=0013ef1c edi=00000001
eip=00c583a6 esp=0013ece4 ebp=ffffffff iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
SomethingWasHere+0x83a6:
00c583a6 8b10 mov edx,dword ptr [eax] ds:0023:deadbabe=????????
0:000> r eip=eax
0:000> g
(4b74.4b54): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=deadbabe ebx=00000001 ecx=77529bac edx=0013ed04 esi=0013ef1c edi=00000001
eip=deadbabe esp=0013ece4 ebp=ffffffff iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
deadbabe ?? ???
0:000> !exploitable -v
HostMachine\HostUser
Executing Processor Architecture is x86
Debuggee is in User Mode
Debuggee is a live user mode debugging session on the local machine
Event Type: Exception
Exception Faulting Address: 0xffffffffdeadbabe
First Chance Exception Type: STATUS_ACCESS_VIOLATION (0xC0000005)
Exception Sub-Type: Data Execution Protection (DEP) Violation
Exception Hash (Major/Minor): 0x4e42002f.0x2059002f
Stack Trace:
Unknown
Unknown
SomethingWasHere+0xaeb8
Instruction Address: 0xffffffffdeadbabe
Description: Data Execution Prevention Violation
Short Description: DEPViolation
Exploitability Classification: EXPLOITABLE
Recommended Bug Title: Exploitable - Data Execution Prevention Violation starting at Unknown Symbol @ 0xffffffffdeadbabe called from SomethingWasHere+0x000000000000aeb8 (Hash=0x4e42002f.0x2059002f)
User mode DEP access violations are exploitable.
The following WinDBG sessions demonstrates control over EIP, EBX, etc., due to a crash. I removed the program name because its going through CERT right now, nevertheless I started fuzzing the application, caused an exception and followed through on finding a method to exploit after the exception. All I needed to do was show proof of concept as I was solely seeking to report an advisory not provide a 'weaponized' exploit
eax=
deadbabe ebx=00000001 ecx=77529bac edx=0013ed04 esi=0013ef1c edi=00000001
eip=
deadbabe esp=0013ece4 ebp=ffffffff iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
deadbabe ??