📚 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  >>  penalyze2 - Project Announcement and Call to Arms

Topic created on: August 22, 2006 03:14 CDT by stephanp .

Hi everyone,

This thread is about one of my projects called penalyze2.
Let's start with a brief on what penalyze2 is.

penalyze2 is Free (as in Freedom) Software malware analyzation package that basically emulates both an x86 CPU and a Windows enviroment. It's currently in some sort of alpha state, however, proof-of-concept analyzation is already working with simple helloworld files.
It is currently developed for Unix-like systems (it has only been tested on GNU/Linux x86 at the moment) and could also be described as sandbox.

What it's basically doing is loading a PE file into memory, checking the PE headers and setting up the 'virtual machine' (aka x86 & Windows emulator). After patching all imports it sets the entry point and starts emulating.

The idea here is to provide a researcher with all API calls the malware does plus their arguments. This way you can easily see what the program does to the system and where it for example connects to via the Internet.

What this also means that if we don't want to, executables won't be able to detect a debugger. Additionally executable packers become obsolete as their unpacking code is simply emulated aswell.

As mentioned earlier it is in a late alpha/early beta state right now and a lot of work still needs to be done. As also mentioned above, penalyze2 is Free Software and licensed under the GNU GPL.
The project page can be found at http://sv.gnu.org/projects/penalyze2 and you can also download the project's sourcecode there.

I'm not only writing this thread in order to inform people about penalyze2 but also to ask for help. Emulating an x86 CPU and a Windows enviroment is quite a lot of work and not really a one-man-job, so if you are intersted in helping to develop penalyze2 simply drop me an email.

If anything remains unclear here go ahead and ask your questions. However, you could also download the source code and give it a try yourself (using the included test files).

Critism, as well as additional ideas, etc., is always appreciated.

Regards,

Stephan Peijnik

  ryanlrussell     August 22, 2006 03:40.04 CDT
Sounds interesting, and ambitious!  Would it be fair to describe this as attempting to replicate the functionality of x86emu without requiring IDA Pro?

The first question that leaps to mind... if you're doing full CPU & environment emulation, does that mean it can run on non-x86 CPUs?  If so, I'm confused about the task item having to do with working correctly on an AMD64 host system.  Just general 64-bit clean concern?

Are you able to pick up some knowledge from x86emu, bochs, and so on... or are you starting from scratch?

  stephanp     August 22, 2006 03:48.44 CDT
As I haven't used the combination of x86emu and IDA Pro yet I really can't give you an answer on your first question.

It should be able to run on non-x86 CPUs, but it has neither been designed nor tested on these. The amd64 task item is about getting it to work correctly on these systems as well and to be honest I'd like it to be working on as many architectures as possible. However, the reason for full emulation was more one of having a 'stealth tool' and no possible way of detecting it.

Now to your third question: I am using a public domain x86 disassembler library currently, so I didn't have to do that much of work regarding interpreting the bytecode. Everything else was pretty much written from scratch though.

As I said, try it yourself, modify it and enhance it. I'd be glad to have other people also working on this project and I'd be more than only willing to accept patches and additions.

*EDIT*

Oh, what I forgot: I'm also willing to accept patches to make the whole thing work in a Windows-bases host-system. However, I don't have a single Windows machine here and hence am neither able to develop a windows version nor am I able to test such a patch.

  dcnstrct     August 26, 2006 00:56.03 CDT
> ryanlrussell: Sounds interesting, and ambitious!  Would it be fair to describe this as attempting to replicate the functionality of x86emu without requiring IDA Pro?

From looking over the documentation it seems that this project is not attempting to provide what x86emu + IDA provides because it will not offer a way save a memory dump at a certin point in the execution (like when the unpacker is finished).   This software will be handy to see what syscalls are being used by malware, but not for unpacking binary execuatables in general.  Does this sound right Stephan ?

--dcnstrct

  stephanp     August 26, 2006 07:29.09 CDT
> dcnstrct:
>
> From looking over the documentation it seems that this project is not attempting to provide what x86emu + IDA provides because it will not offer a way save a memory dump at a certin point in the execution (like when the unpacker is finished).   This software will be handy to see what syscalls are being used by malware, but not for unpacking binary execuatables in general.  Does this sound right Stephan ?

Right now this isn't possible, that's true. However, I am planning on writing a gdb-like user-interface which will of course include a function to dump memory. Combined with breakpoints (ie. break on call of GetProcAddress or similar) this should be perfectly possible.

Right now however, my main focus is on the 'low-level' things and until that is working smoothly a UI is not that high on my priority list.

Technically speaking nearly everything should be possible with penalyze2. If you think you do have an idea for a feature that should be added, let me/us know (mailing-list: penalyze2-discussion at nongnu.org). If you furthermore think you could come up with an implementation I'm fine with that aswell. There is a patchtracker on penalyze2's project page on GNU Savannah, submit patches there.

Regards.

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