exe2powershell is used to convert EXE to BAT files, the previously well known tool for this was exe2bat, this is a version for modern Windows.
This will convert any binary file (*.exe) to a BAT file, the resulting BAT file contains only echo
commands followed by a PowerShell command to re-create the original binary file.
This kind of tool can be useful during a pen-test when you want to trigger a shell without any upload feature. With echo
and PowerShell the auditor is able to upload any binary file to the target system.
This version is modernized from exe2bat to work with current Windows versions as exe2bat had some limitations:
- Needs
debug.exe
available on the target computer (16-bit application which was removed in Windows 7 x64 but available in Windows 7 x86) - Limits input exe size to 64kB
exe2powershell replaces the need of debug.exe
by using a PowerShell command line which is available on all Windows since Windows 7 / 2008 and there is no more limitation in input exe size.
Usage of exe2powershell to Convert EXE to BAT Files
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
C:\exe2powershell\bin>exe2powershell.exe ______ ___ _____ _____ _ _ _ | ____| |__ \| __ \ / ____| | | | | | |__ __ _____ ) | |__) |____ _____ _ _| (___ | |__ ___| | | | __| \ \/ / _ \ / /| ___/ _ \ \ /\ / / _ \ '__\___ \| '_ \ / _ \ | | | |____ > < __// /_| | | (_) \ V V / __/ | ____) | | | | __/ | | |______/_/\_\___|____|_| \___/ \_/\_/ \___|_| |_____/|_| |_|\___|_|_| [ exe2bat reborn in exe2powershell for modern Windows ] [ initial author ninar1, based on riftor work, and modernized by ycam ] [ exe2powershell version 1.0 - keep up2date: asafety.fr / synetis.com ] [*] Usage : exe2powershell.exe inputfile outputfile [*] e.g. : exe2powershell.exe nc.exe nc.bat |
You can download exe2powershell here:
Or read more here.