@@ -23,7 +23,7 @@ class legba(BaseModule):
2323 meta = {
2424 "description" : "Credential bruteforcing supporting various services." ,
2525 "created_date" : "2025-07-18" ,
26- "author" : "@christianfl" ,
26+ "author" : "@christianfl, @fuzikowski " ,
2727 }
2828 _module_threads = 25
2929 scope_distance_modifier = None
@@ -38,6 +38,7 @@ class legba(BaseModule):
3838 "postgresql_wordlist" : "https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Passwords/Default-Credentials/postgres-betterdefaultpasslist.txt" ,
3939 "concurrency" : 3 ,
4040 "rate_limit" : 3 ,
41+ "version" : "1.1.1" ,
4142 }
4243
4344 options_desc = {
@@ -50,72 +51,47 @@ class legba(BaseModule):
5051 "postgresql_wordlist" : "Wordlist URL for PostgreSQL combined username:password wordlist, newline separated" ,
5152 "concurrency" : "Number of concurrent workers, gets overridden for SSH" ,
5253 "rate_limit" : "Limit the number of requests per second, gets overridden for SSH" ,
54+ "version" : "legba version" ,
5355 }
5456
55- deps_common = ["rust" ]
5657 deps_ansible = [
5758 {
58- "name" : "Install dev tools (Debian)" ,
59- "package" : {
60- "name" : ["pkg-config" , "cmake" , "libclang-dev" , "clang" ],
61- "state" : "present" ,
59+ "name" : "Download legba (x86)" ,
60+ "unarchive" : {
61+ "src" : "https://github.com/evilsocket/legba/releases/download/#{BBOT_MODULES_LEGBA_VERSION}/legba-#{BBOT_MODULES_LEGBA_VERSION}-linux-x86_64.tar.gz" ,
62+ "dest" : "#{BBOT_TEMP}" ,
63+ "include" : "legba-#{BBOT_MODULES_LEGBA_VERSION}-linux-x86_64/legba" ,
64+ "remote_src" : True ,
6265 },
63- "become" : True ,
64- "when" : "ansible_facts['os_family'] == 'Debian'" ,
65- "ignore_errors" : True ,
66+ "when" : "ansible_facts['system'] == 'Linux' and ansible_facts['architecture'] == 'x86_64'" ,
6667 },
6768 {
68- "name" : "Install dev tools (Fedora)" ,
69- "package" : {
70- "name" : ["pkgconf-pkg-config" , "cmake" , "clang-devel" , "llvm-devel" , "perl-core" ],
71- "state" : "present" ,
72- },
73- "become" : True ,
74- "when" : "ansible_facts['os_family'] == 'RedHat'" ,
75- "ignore_errors" : True ,
76- },
77- {
78- "name" : "Install dev tools (Arch)" ,
79- "package" : {
80- "name" : ["pkgconf" , "cmake" , "clang" , "openssl" ],
81- "state" : "present" ,
82- },
83- "become" : True ,
84- "when" : "ansible_facts['os_family'] == 'Archlinux'" ,
85- "ignore_errors" : True ,
86- },
87- {
88- "name" : "Get legba repo" ,
89- "git" : {
90- "repo" : "https://github.com/evilsocket/legba" ,
91- "dest" : "#{BBOT_TEMP}/legba/gitrepo" ,
92- "version" : "1.1.1" , # Newest stable, 2025-08-25
93- },
94- },
95- {
96- # The git repo will be copied because during build, files and subfolders get created. That prevents the Ansible git module to cache the repo.
97- "name" : "Copy legba repo" ,
69+ "name" : "Install legba (x86)" ,
9870 "copy" : {
99- "src" : "#{BBOT_TEMP}/legba/gitrepo/" ,
100- "dest" : "#{BBOT_TEMP}/legba/workdir/" ,
71+ "src" : "#{BBOT_TEMP}/legba-#{BBOT_MODULES_LEGBA_VERSION}-linux-x86_64/legba" ,
72+ "dest" : "#{BBOT_TOOLS}/" ,
73+ "mode" : "u+x,g+x,o+x" ,
10174 },
75+ "when" : "ansible_facts['system'] == 'Linux' and ansible_facts['architecture'] == 'x86_64'" ,
10276 },
10377 {
104- "name" : "Build legba" ,
105- "command" : {
106- "chdir" : "#{BBOT_TEMP}/legba/workdir" ,
107- "cmd" : "cargo build --release" ,
108- "creates" : "#{BBOT_TEMP}/legba/workdir/target/release/legba" ,
78+ "name" : "Download legba (ARM64)" ,
79+ "unarchive" : {
80+ "src" : "https://github.com/evilsocket/legba/releases/download/#{BBOT_MODULES_LEGBA_VERSION}/legba-#{BBOT_MODULES_LEGBA_VERSION}-linux-arm64.tar.gz" ,
81+ "dest" : "#{BBOT_TEMP}" ,
82+ "include" : "legba-#{BBOT_MODULES_LEGBA_VERSION}-linux-arm64/legba" ,
83+ "remote_src" : True ,
10984 },
110- "environment " : { "PATH" : "{{ ansible_env.PATH }}:{{ ansible_env.HOME }}/.cargo/bin" } ,
85+ "when " : "ansible_facts['system'] == 'Linux' and ansible_facts['architecture'] == 'aarch64'" ,
11186 },
11287 {
113- "name" : "Install legba" ,
88+ "name" : "Install legba (ARM64) " ,
11489 "copy" : {
115- "src" : "#{BBOT_TEMP}/legba/workdir/target/release /legba" ,
90+ "src" : "#{BBOT_TEMP}/legba-#{BBOT_MODULES_LEGBA_VERSION}-linux-arm64 /legba" ,
11691 "dest" : "#{BBOT_TOOLS}/" ,
11792 "mode" : "u+x,g+x,o+x" ,
11893 },
94+ "when" : "ansible_facts['system'] == 'Linux' and ansible_facts['architecture'] == 'aarch64'" ,
11995 },
12096 ]
12197
0 commit comments