📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  Brainstorms - General  >>  Examples of Python loading shell code ?

Topic created on: October 19, 2008 20:47 CDT by BenBenQ .

Hi,

New here and I've been looking around for examples of Python running shell code stored in an array. I understand this and it is trivial in C, but I don't know the process or implementation in Py...

I'm sure its easy but if anyone can point me in the right direction I would appreciate it, Thanks

  jroyes     October 20, 2008 09:28.17 CDT
I wrote about this some time ago here: http://maliciousattacker.blogspot.com/2008/03/calling-assembly-from-python.html

I used ctypes.

  BenBenQ   October 20, 2008 12:34.14 CDT
Cool, that might just do it.

Its odd, the only other thing I can find even closely related is how to inject payloads into processes, but if you want to run something that is injecting anyway its kinda of redundant to pre-inject. I would have thought there would be more support for python and asm execution?

Thanks, I appreciate it. (btw, I loled at the artard part)

  jroyes     October 20, 2008 15:46.58 CDT
The sad part is that it's true :) I also ended up discovering that SetUnhandledExceptionFilter does not actually muck with SEH. Makes for neat anti-debugging though.

  BenBenQ   October 20, 2008 20:16.47 CDT
I tried the code and it works perfectly! Thanks again!

There is a bit of oddity with my binary shell code, but that's another matter.

J, I sent you a pm here but I'm not sure it went through. I can't find an email address for you. Would you mind pinging me?

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit