Metasploit automatization using Python

This article describes, based on example, approaches to automate metasploit attacks using Python. As known metasploit is written in Ruby and doesn’t support scripts written in python, however metasploit has RPC (Remote Procedure Call) interface through which it is possible to run jobs. On the internet i found two libraries written in Python to interact

linux x86 egghunter shellcode

Egghunter is a stage one piece of code that searches memory for predefined tag that represents start of second stage of shellcode and passes execution to it. To create a simple one we create a c program that pass execution to stage one egghunter that searches for egg in memory and then pass execution to

linux x86 shell reverse tcp shellcode

To create reverse tcp shellcode for linux system there are 4 major steps: create socket; connect to remote host; redirect standard input, output and error to created socket; execute shell. Create socket For x86_32 linux before kernel 4.3 the only entry point for socket API was socketcall() system call. Socketcall number is 102 in unistd_32.h