Skip to content
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

Masscan command not found #1680

Closed
TheFunky1Markimark opened this issue Aug 19, 2024 · 5 comments
Closed

Masscan command not found #1680

TheFunky1Markimark opened this issue Aug 19, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@TheFunky1Markimark
Copy link

Describe the bug
What happened?
Masscan did not run as expected

Expected behavior
What was supposed to happen?
Masscan was supposed to run and detect open ports.

BBOT Command
bbot -m portscan -t evilcorp.com

OS, BBOT Installation Method + Version
OS: Ubuntu, Installation Method: pip, BBOT Version: v2.0.0

Logs
[VERB] portscan: sudo: masscan: command not found

@TheFunky1Markimark TheFunky1Markimark added the bug Something isn't working label Aug 19, 2024
@TheTechromancer TheTechromancer self-assigned this Aug 19, 2024
@TheTechromancer
Copy link
Collaborator

Did some quick troubleshooting on the system; the masscan binary is installed and usable. The BBOT tools dir is in the PATH and also specified explicitly in the sudo command, which uses -E to preserve environment variables. It is truly a mystery as to why this isn't working.

@TheTechromancer
Copy link
Collaborator

mark.log

@TheTechromancer
Copy link
Collaborator

sudo -E -A LD_LIBRARY_PATH=/home/mark/.bbot/lib: PATH=/home/mark/.bbot/tools:/home/mark/.local/bin:/home/mark/.local/pipx/venvs/bbot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin masscan --excludefile /home/mark/.bbot/temp/ma2izauxz1b9hgu8cdpj --rate 300 --wait 5 --open-only -oJ - -iL /home/mark/.bbot/temp/l56n44kuos3nuqupqduy -p 80,23,443,21,22,25,3389,110,445,139,143,53,135,3306,8080,1723,111,995,993,5900,1025,587,8888,199,1720,465,548,113,81,6001,10000,514,5060,179,1026,2000,8443,8000,32768,554,26,1433,49152,2001,515,8008,49154,1027,5666,646,5000,5631,631,49153,8081,2049,88,79,5800,106,2121,1110,49155,6000,513,990,5357,427,49156,543,544,5101,144,7,389,8009,3128,444,9999,5009,7070,5190,3000,5432,1900,3986,13,1029,9,5051,6646,49157,1028,873,1755,2717,4899,9100,119,37

@TheTechromancer
Copy link
Collaborator

The offending line in /etc/sudoers:

Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

@TheTechromancer
Copy link
Collaborator

Fixed in #1708.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants