About me

Since May 2008 I have been working at Università degli Studi di Udine as a reasearch assistant, under the supervision of Prof. Furio Ercolessi. My research work is sponsored by The SpamHaus Project, the world largest anti-spam non-profit organization.

From Sep 2006 to May 2008, I was a visiting research scholar at the Department of Computer Science department of the University of Wisconisn–Madison (USA) working on malware analysis and detection under the supervision of Prof. Somesh Jha.

Research interests

Education

Contact information

Email & Jabber/XMPP      
GPG Key       0x8B143975 (fingerprint: 363D 3EF3 CC92 2069 949C 4F11 6C57 2D70 8B14 3975)
 

Projects and software

EmuFuzzer

EmuFuzzer is a fuzzer for CPU emulators. EmuFuzzer “stresses” a CPU emulator with specially crafted test-cases, representing registers and memory configurations, to verify whether the CPU is properly emulated or not. EmuFuzzer detects improper behaviours of the emulator by running the same test-case concurrently on the emulated and on the physical CPUs and by comparing the state of the two after the execution. Differences in the state testify defects in the code of the emulator. Currently EmuFuzzer supports the following CPU emulators: For more details see the paper Testing CPU emulators.

We also used EmuFuzzer to discover red-pills: programs or procedures capable of identifying if they are executed on a physical CPU or on an emulated CPU. Such red-pills can be used in malicious programs to impede dynamic analysis attempts. For more details see the paper A fistful of red-pills: How to automatically generate procedures to detect CPU emulators and the web-page devoted to the project.

EmuFuzzer is developed by Lorenzo Martignoni, Roberto Paleari, and Giampaolo Fresi Roglia

WUSSTrace

WUSSTrace is a user-space syscall tracer for Microsoft Windows developed for fine grained syscall tracing: it supports the majority of Windows system calls (except GUI system calls), the majority of argument types, and dumps faithfully all the supported types. WUSSTrace produces easy-to-parse XML traces leveraging the Boost serialization library. Tracing is performed by injecting a shared library in the address space of the traced process and by hooking the stubs KiFastSystemCall and KiIntSystemCall in ntdll.dll.
WUSSTrace is developed by Lorenzo Martignoni and Roberto Paleari

Memu

Memu is a malicious code emulator based on QEMU and virtual machine introspection (VMI). Memu can monitor the execution of one or more suspicious program running inside the guest OS (Microsoft Windows XP) and can trace system calls, exceptions, calls to API functions, memory accesses, and even single machine instructions. It also supports taint analysis with arbitrary taint sources and sinks and taint labels up to 32-bits. The emulator exposes an API to develop custom malware analyses.

The behaviour-based malware detector described in the paper A Layered Architecture for Detecting Malicious Behaviors is built as a Memu plugin.

Memu is developed by Lorenzo Martignoni, with the contribution of Matt Fredrikson

ITrace

ITrace provides an easy to use interface to insert a hook into your favourite code emulator or debugger (mine is QEMU) to record on disk the dynamic execution trace for the most exotic off-line analyses. ITrace comes with a trace recorder, a trace reader, and a set of modules to develop your own analyses. If your emulator performs taint analysis, ITrace can record 32-bits taint labels for you in the trace. The trace generated by ITrace is human readable. Executed instructions are interpreted and converted into an intermediate form (IR) which makes explicit all the side effects of each instruction.

Currently ITrace comes with the following modules:

The intermediate form stores everything you might need for you off-line analysis, from the semantic of each instruction, to the value and the taint label of the operands of the instruction. It looks like the following:

# b49f5b6e testb $0x2, (%esi)
b49f5b6e 2158c1 0 ASGN(R(9 0 0 0 0) C(1 0))
b49f5b6e 2158c2 0 ASGN(R(9 b b 0 0) C(1 0))
b49f5b6e 2158c3 0 ASGN(R(9 6 6 1 3e) (== (& M(R(7 0 1f b4ac1300 3e) 8 88 0) C(8 2)) C(8 0)))
b49f5b6e 2158c4 0 ASGN(R(9 7 7 0 3e) (MSB (& M(R(7 0 1f b4ac1300 3e) 8 88 0) C(8 2))))
# b49f5b73 mov (%esi), %eax
b49f5b73 2158c6 0 ASGN(R(1 0 1f fbad2088 3e) M(R(7 0 1f b4ac1300 3e) 20 fbad2088 0))
# b49f5b75 and $0x1008, %eax
b49f5b75 2158c8 0 ASGN(R(9 0 0 0 0) C(1 0))
b49f5b75 2158c9 0 ASGN(R(9 b b 0 0) C(1 0))
b49f5b75 2158ca 0 ASGN(R(9 6 6 0 3e) (== (& R(1 0 1f fbad2088 3e) C(20 1008)) C(20 0)))
b49f5b75 2158cb 0 ASGN(R(9 7 7 0 3e) (MSB (& R(1 0 1f fbad2088 3e) C(20 1008))))
b49f5b75 2158cc 0 ASGN(R(1 0 1f 8 3e) (& R(1 0 1f fbad2088 3e) C(20 1008)))

ITrace has been successful used by me and by a small group of other persons with QEMU and Pin.

ITrace is developed by Lorenzo Martignoni

PyEA (Python Executable Analyser)

PyEA is a hybrid static/dynamic code analyser written in Python. The analyser was originally developed to statically analyse IA-32 malicious programs, but has soon evolved into a generic analyser for compiled programs. PyEA currently supports PE and ELF executables, disassembles executables using a recursive disassembler, and translates each machine instruction into an intermediate form, that makes side effects explicit. The analyses work directly on the intermediate representation and include: PyEA contains a process execution tracer for GNU/Linux based on ptrace() and interfaces with the STP constraint solver (using the PySTP extension module). Recently, support for hybrid analysis of PHP bytecode has been introduced into this framework.

Some of the algorithms for the normalisation and detection of self-mutating malware described in the papers Code Normalization for Self-Mutating Malware. and Detecting Self-Mutating Malware Using Control Flow Graph Matching have been recently ported to PyEA. The fuzzer described in the paper A Smart Fuzzer for x86 Executables is also implemented on top of PyEA.

PyEA is developed by Lorenzo Martignoni and Roberto Paleari

Publications

[1] Giampaolo Fresi Roglia, Lorenzo Martignoni, Roberto Paleari, and Danilo Bruschi. Surgically returning to randomized lib(c). In Proceedings of the 25th Annual Computer Security Applications Conference (ACSAC), Honolulu, Hawaii, USA., pages 60-69. IEEE Computer Society, December 2009.
Abstract | BibTeX | Paper ]
[2] Lorenzo Martignoni, Roberto Paleari, and Danilo Bruschi. A framework for behavior-based malware analysis in the cloud. In Proceedings of the 5th International Conference on Information Systems Security (ICISS 2009), pages 178-192. Springer, December 2009.
Abstract | BibTeX | Paper | Slides ]
[3] Roberto Paleari, Lorenzo Martignoni, Giampaolo Fresi Roglia, and Danilo Bruschi. A fistful of red-pills: How to automatically generate procedures to detect CPU emulators. In Proceedings of the 3rd USENIX Workshop on Offensive Technologies (WOOT), Montreal, Canada. ACM, August 2009.
Abstract | BibTeX | Paper | Slides ]
[4] Emanuele Passerini, Roberto Paleari, and Lorenzo Martignoni. How good are malware detectors at remediating infected systems? In Proceedings of the 6th Conference on Detection of Intrusions and Malware & Vulnerability Assessment (DIMVA), Como, Italy, Lecture Notes in Computer Science, pages 21-37. Springer, July 2009.
Abstract | BibTeX | Paper ]
[5] Lorenzo Martignoni, Roberto Paleari, Giampaolo Fresi Roglia, and Danilo Bruschi. Testing CPU emulators. In Proceedings of the 2009 International Conference on Software Testing and Analysis (ISSTA), Chicago, Illinois, U.S.A., pages 261-272. ACM, July 2009.
Abstract | BibTeX | Paper | Slides ]
[6] Lorenzo Martignoni, Elizabeth Stinson, Matt Fredrikson, Somesh Jha, and John C. Mitchell. A Layered Architecture for Detecting Malicious Behaviors. In Proceedings of the International Symposium on Recent Advances in Intrusion Detection, RAID, Cambridge, Massachusetts, U.S.A., Lecture Notes in Computer Science. Springer, September 2008.
Abstract | BibTeX | Paper | Slides ]
[7] Emanuele Passerini, Roberto Paleari, Lorenzo Martignoni, and Danilo Bruschi. Fluxor: detecting and monitoring fast-flux service networks. In Proceedings of the 5th Conference on Detection of Intrusions and Malware & Vulnerability Assessment (DIMVA), Paris, France, Lecture Notes in Computer Science. Springer, July 2008.
Abstract | BibTeX | Paper ]
[8] Lorenzo Martignoni, Mihai Christodorescu, and Somesh Jha. OmniUnpack: Fast, Generic, and Safe Unpacking of Malware. In Proceedings of the 23rd Annual Computer Security Applications Conference (ACSAC), Miami Beach, Florida, USA. IEEE Computer Society, December 2007.
Abstract | BibTeX | Paper | Slides ]
[9] Andrea Lanzi, Lorenzo Martignoni, Mattia Monga, and Roberto Paleari. A Smart Fuzzer for x86 Executables. In Proceedings of the 3rd International Workshop on Software Engineering for Secure Systems, SESS, Minneapolis, MN, USA. ACM, May 2007.
Abstract | BibTeX | Paper ]
[10] Danilo Bruschi, Lorenzo Martignoni, and Mattia Monga. Code Normalization for Self-Mutating Malware. Security & Privacy, 5(2):46-54, May 2007.
Abstract | BibTeX | Paper ]
[11] Danilo Bruschi, Lorenzo Martignoni, and Mattia Monga. Detecting Self-Mutating Malware Using Control Flow Graph Matching. In Proceedings of the 3rd Conference on Detection of Intrusions and Malware & Vulnerability Assessment (DIMVA), Berlin, Germany, July 2006.
Abstract | BibTeX ]
[12] Danilo Bruschi, Lorenzo Martignoni, and Mattia Monga. Using Code Normalization for Fighting Self-Mutating Malware. In Proceedings of the International Symposium of Secure Software Engineering, ISSSE, Arlington, VA, USA. IEEE Computer Society, March 2006.
Abstract | BibTeX ]
[13] Danilo Bruschi, Lorenzo Martignoni, and Mattia Monga. Using Code Normalization for Fighting Self-Mutating Malware. Technical Report 08-06, Dipartimento di Informatica e Comunicazione - Università degli Studi di Milano, March 2006.
Abstract | BibTeX | Paper ]
[14] Danilo Bruschi, Lorenzo Martignoni, and Mattia Monga. Detecting Self-Mutating Malware Using Control Flow Graph Matching. Technical Report 09-06, Dipartimento di Informatica e Comunicazione - Università degli Studi di Milano, March 2006.
Abstract | BibTeX | Paper ]
[15] Danilo Bruschi, Lorenzo Martignoni, and Mattia Monga. How to Reuse Knowledge About Forensic Investigations. In Proceedings of the 4th Digital Forensic Research Workshop, DFRWS, Linticum, MD, USA., August 2004.
Abstract | BibTeX | Paper ]

Teaching

Operating systems/Sistemi operativi – 2008/2009

The educational materials for the operating system class (laboratory) I taught in the second semester of the academic year 2008/2009 is available on-line at the URL http://homes.dico.unimi.it/~sisop/ (Italian only).

Hacking

I am a member of the hacking team ChocolateMakers, also known as Guard@MyLan0 (you must know Italian very well to appreciate the name of the team), affiliated with the LaSeR laboratory (Università degli Studi di Milano). With the team I partecipated to various hacking contests, including CODEGATE, DEFCON, iCTF and CIPHER.

In 2005 I organized the first Italian Capture The Flag (CTF-IT) and in 2009 I contributed to the organization of the fifth edition of CIPHER.