Commit Graph

205 Commits

Author SHA1 Message Date
William Vu 14da99bb3d Fix missing RequestError in a few post modules
Should be Rex::Post::Meterpreter::RequestError.
2018-06-12 17:11:29 -05:00
Adam Cammack 435f965418 Use #include? over Regexps with plain strings 2018-05-30 15:32:04 -05:00
Auxilus 72fb51f877 add extra check for failed command outputs 2018-05-24 20:47:06 +05:30
Auxilus 40b6b97dbf Update enum_network.rb 2018-05-05 10:56:55 +05:30
Auxilus ec55a631ef Check if the data is nil before pasisng to store_loot
when I ran this module for linux/aarch64/meterpreter_reverse_tcp for payload running in termux, it was obvious that without root the commands will return error, It still created empty files in `.msf4/loot`

```
msf5 post(linux/gather/enum_network) > run
                                                                                                  
[*] Running module against localhost.localdomain
[*] Module running as /system/bin/sh: /usr/bin/whoami: not found
[+] Info:
[+]
[+]     Linux localhost 3.10.84-perf+ #1 SMP PREEMPT Tue Oct 24 01:07:25 CST 2017 aarch64 Android
[*] Collecting data...
[+] /system/bin/sh: /sbin/route: not found
[-] Failed to open file: /etc/ssh/sshd_config: core_channel_open: Operation failed: 1
[-] unable to get data for Network config
[+] Network config stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_735775.txt
[-] unable to get data for Route table                                                            
[+] Route table stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_599334.txt
[-] unable to get data for Firewall config
[+] Firewall config stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_790893.txt
[-] unable to get data for DNS config
[+] DNS config stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_867340.txt
[-] unable to get data for SSHD config                                                           
[+] SSHD config stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_900906.txt                                                                  [-] unable to get data for Host file
[+] Host file stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_179877.txt
[-] unable to get data for Active connections                                                     
[+] Active connections stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_656035.txt                                                           [-] unable to get data for Wireless information
[+] Wireless information stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_168144.txt
[-] unable to get data for Listening ports                                                        
[+] Listening ports stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_999548.txt                                                              [-] unable to get data for If-Up/If-Down
[+] If-Up/If-Down stored in /data/data/com.termux/files/home/.msf4/loot/20180505105107_default_127.0.0.1_linux.enum.netwo_860869.txt
[*] Post module execution completed                                                               
msf5 post(linux/gather/enum_network) >
```
2018-05-05 10:52:08 +05:30
Brendan Coles 3351a59efb Update linux/gather/enum_protections 2018-04-29 06:52:47 +00:00
h00die 8a49a639a0 check file exists before reading 2017-09-29 22:34:38 -04:00
William Webb a07f7c9f42 Land #8520, Linux post module to find and collect TOR hidden service configurations 2017-09-12 13:39:18 -05:00
Brent Cook f7dc831e9a Land #8799, Add module to detect Docker, LXC, and systemd-nspawn containers 2017-08-20 14:45:57 -05:00
Richard Claus f07318c976 Fix post/linux/gather/hashdump NoMethodError 2017-08-16 00:56:32 -07:00
james b8d794cc37 Identify systemd-nspawn containers in checkcontainer
Check the value of the "container" environment variable:
 - "lxc" indicates a LXC container
 - "systemd-nspawn" indicates a systemd nspawn container
2017-08-06 00:46:09 -05:00
james 9858147dae Add module to detect Docker and LXC containers
Detect Docker by:
 - Presence of .dockerenv file.
 - Finding "docker" in /proc/1/cgroup
Detect LXC by:
 - Finding "lxc" in /proc/1/cgroup
2017-08-05 18:59:36 -05:00
Brent Cook 6300758c46 use https for metaploit.com links 2017-07-24 06:26:21 -07:00
g0tmi1k 3f6925196b OCD - store_loot & print_good 2017-07-19 13:02:49 +01:00
g0tmi1k b8d80d87f1 Remove last newline after class - Make @wvu-r7 happy 2017-07-19 11:19:49 +01:00
g0tmi1k 4720d1a31e OCD fixes - Spaces 2017-07-14 08:46:59 +01:00
Spencer McIntyre 0da9f4d64a Refactor railgun "DLL" references to library 2017-06-27 17:34:06 -04:00
Harvey Phillips 4278339869 Added multi-file support for torrc and use locate instead of find when searching 2017-06-07 20:08:23 +01:00
Harvey Phillips 71fde14b6c Linux post module to grab TOR hidden service hostnames and private keys 2017-06-06 22:29:14 +01:00
Harvey Phillips f557aa3c9c Linux post module to search for and grab TOR hidden service configurations 2017-06-06 21:59:02 +01:00
Brent Cook 7bcaaf33c7 Land #8294, gnome keyring post exploit credential dumper 2017-05-12 10:08:53 -05:00
Brent Cook e9fcc3c291 msftidy fixes 2017-05-12 10:08:26 -05:00
William Vu 64452de06d Fix msf/core and self.class msftidy warnings
Also fixed rex requires.
2017-05-03 15:44:51 -05:00
Spencer McIntyre da6c03d13f Fix function names to always be snake_case 2017-04-26 09:30:29 -04:00
Spencer McIntyre ffe6d35b4d Add a module to dump network passwords from gnome 2017-04-21 16:17:18 -04:00
jvoisin 84b9449137 Add some binaries to enum_protections
- gradm2 for grsec
- aa-status for apparmor
- getenforce for setlinux
2017-03-10 14:16:58 +01:00
David Maloney eb73a6914d replace old rex::ui::text::table refs
everywhere we called the class we have now rewritten it
to use the new namespace

MS-1875
2016-08-10 13:30:09 -05:00
Brent Cook 57ab974737 File.exists? must die 2016-04-21 00:47:07 -04:00
Christian Mehlmauer 3123175ac7 use MetasploitModule as a class name 2016-03-08 14:02:44 +01:00
Brent Cook f703fa21d6 Revert "change Metasploit3 class names"
This reverts commit 666ae14259.
2016-03-07 13:19:55 -06:00
Brent Cook 44990e9721 Revert "change Metasploit4 class names"
This reverts commit 3da9535e22.
2016-03-07 13:19:48 -06:00
Christian Mehlmauer 3da9535e22 change Metasploit4 class names 2016-03-07 09:57:22 +01:00
Christian Mehlmauer 666ae14259 change Metasploit3 class names 2016-03-07 09:56:58 +01:00
William Vu 16e6ced867 Land #6108, OpenVPN creds scraper 2015-11-23 14:25:19 -06:00
William Vu 601d4fda9f Add note about --auth-nocache 2015-11-23 14:24:26 -06:00
Roberto Soares ac99f9c229 Fix condition 2015-11-17 00:52:42 -02:00
Roberto Soares f69e7c0fb3 Fix condition 2015-11-17 00:49:04 -02:00
Roberto Soares a48d0b275b Added check if the commands executed successfully. 2015-11-17 00:07:31 -02:00
Jon Hart 8f86b2519f Resolve 'duplicate key warning' for some modules 2015-11-09 18:40:32 -08:00
Roberto Soares 0bce90654f Changed path to save dump data 2015-10-22 15:11:55 -02:00
Roberto Soares 467ae52ec3 Remove redundant check 2015-10-21 13:12:45 -02:00
Roberto Soares 78d5e52dd6 Add OpenVPN Grab Credentials - Post Module 2015-10-19 23:11:02 -02:00
William Vu 8866b15f3b Fix creds reporting 2015-10-01 00:24:43 -05:00
wchen-r7 d55757350d Use the latest credential API, no more report_auth_info 2015-09-04 03:04:14 -05:00
jvazquez-r7 ae172691f2 Update linux gather post modules 2015-06-29 10:21:13 -05:00
jvazquez-r7 2cbb107bba Update enum_configs 2015-06-29 09:55:18 -05:00
wchen-r7 39d38f1641 Update pptpd_chap_secrets to use the new cred API 2015-06-03 16:33:10 -05:00
William Vu 001253a8da Clean up module some more 2015-04-15 22:02:04 -05:00
Roberto Soares c6e8ffb7e3 Fix some "mistakes" following the style guide 2015-04-15 00:35:14 -03:00
Roberto Soares 9250869ace Fix typo 2015-04-14 20:19:38 -03:00