-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create PentestGPT.txt #398
base: master
Are you sure you want to change the base?
Conversation
Adding my PentestGPT version 1 to the recon category This script automates the gathering of detailed system information and uses the OpenAI GPT-3.5 Turbo API to generate a pentesting report based on the collected information. Additionally, the script showcases an example of obfuscation to protect sensitive parts of the code and to evade basic detection mechanisms.
REM Create PowerShell script to gather system information | ||
DELAY 500 | ||
STRING $system_info = @{ | ||
ENTER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENTER```
can be replaced with `STRINGLN`
DELAY 500 | ||
STRING 'OS' = $(Get-CimInstance Win32_OperatingSystem).Caption; | ||
ENTER | ||
DELAY 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except on a very slow target system, (or from a device that isn't a real usb rubber ducky), these delays shouldn't be required.
STRING "@ | ||
ENTER | ||
DELAY 500 | ||
STRING Set-Content -Path $env:USERPROFILE\Desktop\Pentesting_Report.html -Value $htmlContent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should likely be a DEFINE
so payload user can supply their desired path
STRING $htmlContent = @" | ||
ENTER | ||
DELAY 500 | ||
STRING <html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
injecting code blocks can be made more readable by using string blocks:
https://docs.hak5.org/hak5-usb-rubber-ducky/ducky-script-basics/keystroke-injection#stringln-blocks
Thank you very much for the reviews. I will be applying them all as soon as I have access to my computer. |
What does my payload do?
This script serves a dual purpose:
Moreover, the script demonstrates a technique for obfuscating specific code sections, which can be instrumental in safeguarding sensitive code fragments and dodging rudimentary detection mechanisms.
How can others use it?
Requirements: