-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
[BUG] Powershell-empire bypassuac_fodhelper.py local variable error #534
Comments
I was having the same issue when I was using the Kali package version of Empire 4.3.0-0kali1, and I think these changes will resolve the issues with the script with * Use the Case: Agent Interactive Menu (bypassuac shortcut) [2 changes required]Step 1: Edit the following lines of code in
|
I appreciate everyone taking the time to let us know what to fix. I merged the fixes and testing now, will cut a release as soon as we are done. Thanks! |
Note: Please fill out all sections (if applicable) and do not delete the below section headers, otherwise the bot will close the issue.
Empire Version
OS Information (Linux flavor, Python version)
Describe the bug
Powershell-empire contains an error in the following script ‘/usr/share/powershell-empire/empire/server/modules/powershell/privesc/bypassuac_fodhelper.py’:
[!] Error: UnboundLocalError("local variable 'script_end' referenced before assignment")
Snaptext from bypassuac_fodhelper.py reference to local variable 'script_end' :
else:
script_end += "Invoke-FodHelperBypass -Command "%s"" % (enc_script)
if main_menu.obfuscate:
script_end = data_util.obfuscate(main_menu.installPath, psScript=script_end,
obfuscationCommand=main_menu.obfuscateCommand)
script += script_end
script = data_util.keyword_obfuscation(script)
I have google for possible solution, but I cannot find a good solution for it. So I am unable to continue the empire exercises
To Reproduce
Steps to reproduce the behavior:
sudo apt-get update
sudo apt-get install powershell-empire
sudo powershell-empire server
Open a new terminal
sudo powershell-empire client
(Empire: <agent_name>) > usemodule privesc/bypassuac_fodhelper
(Empire: powershell/privesc/bypassuac_fodhelper) > set Listener http
(Empire: powershell/privesc/bypassuac_fodhelper) > execute
[!] Error: UnboundLocalError("local variable 'script_end' referenced before assignment")
Expected behavior
The output should be as followed:
[>] Module is not opsec safe, run? [y/N] y
(Empire: powershell/privesc/bypassuac_fodhelper) >
Job started: 4STVDU
[+] Initial agent <agent_name> from <target_ip> now active (Slack)
(Empire: powershell/privesc/bypassuac_fodhelper) >
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: