Sup niggas. I'm working on a tool that will automate the generation of shell code and compilation of Asm and C exploits that already exist.
For the exploits that already exist i am using data from Exploit DB. I got the source code of the exploits on my box already but i have info on all of them stored in a JSON file. I want to be able to search my big ass JSON files and retrieve for instance the path of where the source code for exploit X is located.
Consider the following in JSON.
{
"SEARCH": "Linux",
"DB_PATH_EXPLOIT": "~/tool/shellcodes",
"RESULTS_EXPLOIT": [
{"Title":"Linux/x86_64 - Reverse (127.0.0.1:4444/TCP) Shell (/bin/sh) + Password (pass) Shellcode (120 bytes)",
"EDB-ID":"47291",
"Date":"2019-08-19",
"Author":"Gonçalo Ribeiro",
"Type":"shellcode",
"Platform":"linux_x86-64",
"Path":"~/tool/shellcodes/linux_x86-64/47291.c"},
{"Title":"Linux/x86_64 - Wget Linux Enumeration Script Shellcode (155 Bytes)",
"EDB-ID":"47151",
"Date":"2019-07-23",
"Author":"Kağan Çapar",
"Type":"shellcode",
"Platform":"linux_x86-64",
"Path":"~/tool/shellcodes/inux_x86-64/47151.c"},
]
}
I know JSON and Python go very well together, and i know how to load a JSON file, but i am kind of fuzzy on how i am going to select for a certain item from each entry, say the "Path" item for instance. Is it easier to use regex, or iteration over the items with a `for` loop, or both?
Of course i'll be working on this while this thread is up, but i figured i'd post this here so i can later come back to it to see if anyone has left some insightful comments.
Oh BTW while i am here, i am building a mini OffSec framework as well that will be both compatible with Windows and Linux. The windows version will be deployed via windows installer. I can make a simple installer with NSIS easy enough but i want it to look professional and be able to customize what the installation script does. To that end i got AppDeploy and AppDeploy Repackager in order to write an MSI installer, as far as i am aware it can build chain installers and the scripting language is VSIX or MSIX, but don't quote me on that.
If you have any experience with those or anything similar i would love to hear about them.
Also i will be signing my Windows binaries with CVE-2020-0601, they won't be malicious but signed stuff has more clout even if it's spoofed. Also if you didn't know you could fake sign your windows and linux binaries complete with certs and all, well now you know. I got a shell script to automate the process if you are interested.