Jugaad: Linux Thread Injection Kit
Aseem Jakhar details aseem "@" Jakhar - Jugaad - Linux Thread Injection Kit Windows malware conveniently use the CreateRemoteThread() api to delegate critical tasks inside of other processes.
Summary
Architecture and Background
Aseem "@" Jakhar - Jugaad - Linux Thread Injection Kit Windows malware conveniently use the CreateRemoteThread() api to delegate critical tasks inside of other processes. However till now there is no API on Linux to perform such operation. This paper talks about my work on creating an API similar to createRemoteThread() on *nix OSes. The kit currently works on Linux, allocates space inside a process and injects and executes arbitrary payload as a thread into that process. It utilizes the ptrace() functionality to manipulate other processes on the system.
Vulnerability Analysis
ptrace() is an API generally used by debuggers to manipulate(debug) a program. By using the same functionality to inject and manipulate the flow of execution of a program Jugaad is able to inject the payload as a thread. There is another awesome tool injectSo that injects the whole library into a process, however it leaves traces like the name and path of the injected library which can easily be found by reading the process maps file. Jugaad does an in-memory thread injection and hence is stealthier as there are no traces of any library found in the maps file. It however allocates memory in the process using mmap2 system call which only shows up as allocated memory in maps file but does not reveal anything about the injection.
Exploitation and Demonstrations
The payload to be executed runs inside the thread and is independent of the kit - you chose your payload, jugaad injects the payload. Aseem Jakhar is an Independent security researcher with 7 years of experience in system programming, security research and consulting. He has worked on various security software including UTM appliances, Messaging/security appliances, Anti-Spam/antivirus engines, multicast packet reflector, Transparent HTTPS proxy with Captive portal, Bayesian spam filter to name a few. He has been a speaker at various security conferences like Xcon 2009, Blackhat EU 2008, Clubhack 2008/2009/2010, IBM Security and Privacy 2009, Cocon 2010, ISACA Bangalore 2010, Gnunify 2007/2009/2011. He is the founder of null - The open security community(a registered non-profit organization, ) , the largest security community in India.
Remediation and Defensive Strategies
null is now planning to expand outside India as well. Currently he is working full-time on null initiatives. One of the null initiatives is nullcon security conference ( ) which is a favourite go-to destination of hackers and security professionals in the Indian sub-continent. Before starting on his own he was working with IBM. Twitter: @aseemjakhar
Related talks
Main Stage·44 min
Mouse · Renderman
Mouse and Renderman details familiarity Breeds Contempt SANDY "MOUSE" CLARK UNIVERSITY OF PENNSYLVANIA BRAD "RENDERMAN" HAINES CHIEF RESEARCH MONKEY, RENDERLAB.
Main Stage·50 min
Nate Lawson · Bruce Potter · Deviant Ollam
Nate Lawson and Bruce Potter explores and that's how i lost my eye at DEF CON 19, examining wireless-security and practical defenses.
Main Stage·27 min
Andrew Gavin
Andrew Gavin - Gone in 60 Minutes: Stealing Sensitive Data from Thousands of Systems Simultaneously with OpenDLP Got domain admin to a couple of thousand Windows systems.


