diff --git a/red-teaming/regsvcs/README.md b/red-teaming/regsvcs/README.md index 70482ce..f3da8e9 100644 --- a/red-teaming/regsvcs/README.md +++ b/red-teaming/regsvcs/README.md @@ -10,6 +10,41 @@ powershell -file build.ps1 ### Step 2: Generate source code file +Included in this directory script is a helper utility allowing one to quickly generate desired csharp source code file to be used for further `csc` compilation. + +Usage: + +``` +python3 generateRegsvcs.py --help + + :: Regsvcs Code Execution Source code generation utility + To be used during Red-Team assignments to launch Powershell/Shellcode payloads via Regsvcs/Regasm. + Mariusz B. / mgeeky, + +usage: .\generateRegsvcs.py [options] + +positional arguments: + inputFile Input file to be embeded within C# code. May be either Powershell script, raw binary Shellcode or .NET Assembly (PE/EXE) file. + +optional arguments: + -h, --help show this help message and exit + -e, --exe Specified input file is an Mono/.Net assembly PE/EXE. WARNING: Launching EXE is currently possible ONLY WITH MONO/.NET assembly EXE/DLL files, not an ordinary native PE/EXE! + -r, --raw Specified input file is a raw Shellcode to be injected in self process in a separate Thread. +``` + +Sample use case: + +``` +python3 generateRegsvcs.py -r notepad64.bin > program.cs + + :: Regsvcs Code Execution Source code generation utility + To be used during Red-Team assignments to launch Powershell/Shellcode payloads via Regsvcs/Regasm. + Mariusz B. / mgeeky, + +[?] File specified as raw Shellcode. + +``` + ``` python3 generateRegsvcs.py -r payload.bin > program.cs ``` diff --git a/red-teaming/regsvcs/program.cs b/red-teaming/regsvcs/program-template.cs similarity index 100% rename from red-teaming/regsvcs/program.cs rename to red-teaming/regsvcs/program-template.cs