Skip to content

System.OverflowException #6

@plackyhacker

Description

@plackyhacker

Atom Bombing Technique

Sometimes this line throws an overflow exception:

NtQueueApcThread(hThread, pVirtualProtect, (UInt32)codeCave, (IntPtr)shellcode.Length, (Int32)(MemoryProtection.PAGE_EXECUTE_READWRITE));

The original technique uses ROP chains to call VirtualProtect, as I am only passing the first three parameters to VirtualProtect using the NtQueueApcThread the stack may be corrupt. Needs further investigation.

**Message**
"Arithmetic operation resulted in an overflow."	string

**Source**
"mscorlib"

**StackTrace**
"at System.IntPtr.op_Explicit(IntPtr value)\r\n   at ShellcodeInjectionTechniques.AtomBomb.Run(Process target, Byte[] shellcode) in C:\\Users\\John\\source\\repos\\ShellcodeInjectionTechniques\\ShellcodeInjectionTechniques\\Techniques\\AtomBomb.cs:line 110\r\n   at ShellcodeInjectionTechniques.Program.Main(String[] args) in C:\\Users\\John\\source\\repos\\ShellcodeInjectionTechniques\\ShellcodeInjectionTechniques\\Program.cs:line 43"

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions