Add legba module for bruteforcing various services - #2530
Conversation
|
This looks great, nice work! Legba has been a much requested module. The trick will be writing tests for the different protocols, and also getting Legba to compile properly on all the different platforms. @Vinnie64 may be able to help as he's been working on something similar to this |
|
Nice! I can start working on it and see how it goes. Input from @Vinnie64 is also appreciated |
|
I think the distro tests are now failing because
Is it intended this way? At least I expected it to be the other way around @TheTechromancer |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2530 +/- ##
=====================================
- Coverage 92% 92% -0%
=====================================
Files 411 411
Lines 34054 34139 +85
=====================================
+ Hits 31072 31134 +62
- Misses 2982 3005 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I think EDIT: |
|
@christianfl that fix has been merged; you may need to rebase from dev. |
026a7af to
24d64b4
Compare
|
Thanks @TheTechromancer ! |
c82ab51 to
1f5bd15
Compare
|
Hey! Did a bit of work again 😎 Feedback welcome! If you'd consider merging, feel free to squash the commits into one. |
|
Saw that you are in the process of deprecate |
Hi, yes this is happening - but it wont make into stable until 3.0. Could be a while before that happens. Going to try to test this out next week, from what I had a chance to look at so far, looks great. Really appreciate all the work writing tests and supporting all the distros, etc. |
|
You're very welcome! Ok good to know, cool to see those event type merged. Feel free to ping me in case anything's needed here. |
|
Fantastic work on this module. A couple small changes and then it should be good to merge:
diff --git a/bbot/modules/deadly/legba.py b/bbot/modules/deadly/legba.py
index b6d7da6e4..91d7b5488 100644
--- a/bbot/modules/deadly/legba.py
+++ b/bbot/modules/deadly/legba.py
@@ -41,15 +41,15 @@ class legba(BaseModule):
}
options_desc = {
- "ssh_wordlist": "Wordlist URL for SSH combined username:password wordlist, newline separated (default https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Passwords/Default-Credentials/ssh-betterdefaultpasslist.txt)",
- "ftp_wordlist": "Wordlist URL for FTP combined username:password wordlist, newline separated (default https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Passwords/Default-Credentials/ftp-betterdefaultpasslist.txt)",
- "telnet_wordlist": "Wordlist URL for TELNET combined username:password wordlist, newline separated (default https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Passwords/Default-Credentials/telnet-betterdefaultpasslist.txt)",
- "vnc_wordlist": "Wordlist URL for VNC password wordlist, newline separated (default https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Passwords/Default-Credentials/vnc-betterdefaultpasslist.txt)",
- "mssql_wordlist": "Wordlist URL for MSSQL combined username:password wordlist, newline separated (default https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Passwords/Default-Credentials/mssql-betterdefaultpasslist.txt)",
- "mysql_wordlist": "Wordlist URL for MySQL combined username:password wordlist, newline separated (default https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Passwords/Default-Credentials/mysql-betterdefaultpasslist.txt)",
- "postgresql_wordlist": "Wordlist URL for PostgreSQL combined username:password wordlist, newline separated (default https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Passwords/Default-Credentials/postgres-betterdefaultpasslist.txt)",
- "concurrency": "Number of concurrent workers, gets overridden for SSH (default 3)",
- "rate_limit": "Limit the number of requests per second, gets overridden for SSH (default 3)",
+ "ssh_wordlist": "Wordlist URL for SSH combined username:password wordlist, newline separated",
+ "ftp_wordlist": "Wordlist URL for FTP combined username:password wordlist, newline separated",
+ "telnet_wordlist": "Wordlist URL for TELNET combined username:password wordlist, newline separated",
+ "vnc_wordlist": "Wordlist URL for VNC password wordlist, newline separated",
+ "mssql_wordlist": "Wordlist URL for MSSQL combined username:password wordlist, newline separated",
+ "mysql_wordlist": "Wordlist URL for MySQL combined username:password wordlist, newline separated",
+ "postgresql_wordlist": "Wordlist URL for PostgreSQL combined username:password wordlist, newline separated",
+ "concurrency": "Number of concurrent workers, gets overridden for SSH",
+ "rate_limit": "Limit the number of requests per second, gets overridden for SSH",
}
deps_common = ["rust"]
@@ -120,7 +120,7 @@ class legba(BaseModule):
]
async def setup(self):
- self.output_dir = "/tmp/legba-output"
+ self.output_dir = self.scan.temp_dir / "legba-output"
self.helpers.mkdir(self.output_dir)
return True |
886f709 to
5bac4ad
Compare
|
Thanks for reviewing! I applied the suggested changes |
4cf3944 to
a2315a6
Compare
|
My fault 😁 Works again. I squashed commits so I think it's ready to be merged! |
|
Just FYI, I think the one failed test was only due to a CI hickup. |
|
@christianfl thanks again for your work on this. I want to merge it but it's adding 30 minutes to the tests. I noticed even when running it on my laptop it takes upwards of 10 minutes to compile 😬 I hate to ask since I know you already fought with the ansible stuff. But now that legba finally has precompiled releases, can we opt for downloading those directly? |
a2315a6 to
f024082
Compare
|
No worries @TheTechromancer |
|
Any update on this? We got so close, would love to get it merged! |
|
Sorry for the delay, we were exceedingly busy. We'll look at it soon. Be assured, I can only rest once this is merged! |
f024082 to
2c64f2e
Compare
…or legba Move away from compiling legba locally to reduce build time
| { | ||
| "name": "Download legba (x86)", | ||
| "unarchive": { | ||
| "src": "https://github.com/evilsocket/legba/releases/download/#{BBOT_MODULES_LEGBA_VERSION}/legba-#{BBOT_MODULES_LEGBA_VERSION}-linux-x86_64.tar.gz", |
There was a problem hiding this comment.
We should be able to do this all in one go similar to here:
Line 41 in a0094bd
Hey there!
Saw the discussion on: #1689
We developed a Legba module internally and I did a thorough review. Would you mind include it and/or have some comments?
Best wishes,
Christian
Supported protocols
Screenshot
ToDo