Skip to main content

Posts

Showing posts from February, 2018

Privilege Escalation Tricks : Shell Escape and Executing Shell Commands Via GDB

Often during penetest or CTFs you might need to execute shell commands but due to limited privileges you cannot and certain time you need to escape restricted shells, . In such scenario certain techniques comes handy. Like Using NMAP   Using Vi Editor Using Find Command Yesterday while I was playing with GDB , I found a way by which we can achieve similar results. Here you can see , I can invoke system commands from the gdb shell. Further more you can get a nice shell as well  Thanks for reading ! 

ASM to ShellCode and Shellcode to ASM

As i have started a journey into vulnerability research and exploitation, i thought of sharing some topics which I found very confusing initially. So i will try to detail as much information as possible. So we will begin by writing a simple helloworld assembly code. The code will do the following Print HelloWorld and Exit Now you may wonder why do I have to write a code that exits ? If such is the case then you might probably have written good amount of code in high level language. The compilers of high level languages takes care of it i.e writing the extra code in the object file like the exit code. Internally every operations like read , write , exit and so on requires some low level calls to kernel. These calls are called SysCalls. So if you are programming using high level language like C and C++ , then you don't need to write codes to make the syscalls because due to the abstraction layer that hides the excessive code that is required to code. The compiler takes care