Commit Graph

18316 Commits

Author SHA1 Message Date
Heyder Andrade e1d12e47c3 Making SSH defaults widely used 2022-04-18 19:22:56 +02:00
Heyder Andrade c4d8ff839e Rubocop 2022-04-18 19:12:50 +02:00
Jack Heysel 37e334f95d Rubocop 2022-04-18 09:36:52 -07:00
Jack Heysel 9e283ae1b1 Refactored aassigned list of modules 2022-04-18 09:35:08 -07:00
Heyder Andrade 7431f76c19 Making SSH defaults widely used 2022-04-18 18:03:57 +02:00
Heyder Andrade d2e122c7f8 Rubocop 2022-04-18 17:57:01 +02:00
Heyder Andrade 44b34b772a Making SSH defaults widely used 2022-04-18 17:53:42 +02:00
Heyder Andrade be6a56feff Rubocop 2022-04-18 17:49:04 +02:00
Heyder Andrade c7ce4d2592 Making SSH defaults widely used 2022-04-18 17:38:41 +02:00
Jeffrey Martin 7c8c0b5e05 Land #16446, Bump RubySMB 2022-04-16 18:10:19 -05:00
Jack Heysel 0d3f50522d Land #16318 Add support to old KEX algorithms
This commit fix the issue #16138 by adding
support to old key exchange algorithms in
the net/ssh lib by defining the
append_all_supported_algorithms to true.
2022-04-14 11:29:39 -07:00
Grant Willcox b83a4b2a7a Add in fixes to module and documentation from final review 2022-04-14 12:45:15 -05:00
Heyder Andrade bf849eb2a2 Making SSH defaults widely used 2022-04-14 17:27:19 +02:00
bwatters f32443b477 Update with debug source code and options, cleanup module code per gwillcox-r7 2022-04-14 10:25:55 -05:00
Heyder Andrade c4700c9e64 Rubocop 2022-04-14 17:25:48 +02:00
Heyder Andrade 1305baf6f6 Module should use ssh_defaults 2022-04-13 18:51:43 +02:00
ORelio fa86decd09 Apply suggestion from code review
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
2022-04-13 18:25:45 +02:00
ORelio 1ddd893b0f VNC Keyboard Exec: Avoid typing too fast
Avoid overloading target's keyboard buffer by inserting small sleeps in long commands
2022-04-13 14:28:17 +02:00
bwatters 42a56b2800 Remove the thing I commented out..... 2022-04-12 21:19:20 -05:00
bwatters 147d6e1df7 Added docs, reverted strip_comments, rubocop'd 2022-04-12 21:14:11 -05:00
Spencer McIntyre a4a9bc033a Fix building the SessionSetup request for MS17-010
RubySMB commit 8035d9c2 broke the exploit's SessionSetup request.
2022-04-12 10:45:17 -04:00
vleminator 2fdcc143c0 Improve usability by turning the payload path into custimizablea module option 2022-04-08 11:10:16 +02:00
vleminator cf5bca9166 Improve exploit reliability 2022-04-08 10:47:23 +02:00
vleminator 6c96fd9ab9 Apply rubocop suggestions 2022-04-08 09:48:41 +02:00
bwatters 96d86944da Added precompiled binary and option to strip output, fixed comment-strip bug 2022-04-07 17:09:35 -05:00
Spencer McIntyre 5de966cfb1 Land #16382, CVE-2022-26904 SuperProfile LPE 2022-04-07 12:52:39 -04:00
Grant Willcox 51e37bbe42 Add in process kill off code for Meterpreter sessions, seems I forgot to include this 2022-04-07 10:48:08 -05:00
vleminator 7b2e8cf37f Apply suggestions from code review
Co-authored-by: bcoles <bcoles@gmail.com>
2022-04-07 16:57:00 +02:00
vleminator 3bba17bc56 fail_with should not be used in check 2022-04-07 16:53:17 +02:00
vleminator b60dd43405 Add modules notes, with Spring4Shell 2022-04-07 16:46:49 +02:00
vleminator 53adf24c86 Apply suggestions from code review
Co-authored-by: bcoles <bcoles@gmail.com>
2022-04-07 16:40:03 +02:00
vleminator 4e6176d9ca Finish exploit CVE-2022-22965 2022-04-07 15:22:18 +02:00
bwatters db89fc5e7a Add module for cve-2022-0995 2022-04-06 13:35:14 -05:00
Grant Willcox 4638067723 Fix RuboCop errors 2022-04-06 09:18:05 -05:00
Christophe De La Fuente 94e0eec249 Land #16082, Add ShadowMitmDispatcher to the smb_shadow module 2022-04-06 11:45:59 +02:00
Tim W d60754ea37 Land #16401, add CVE-2022-22616 to osx_gatekeeper_bypass 2022-04-06 07:57:32 +01:00
Grant Willcox c8c91fcaf3 Add in fix to ensure that we can spawn sessions automatically on Windows 10 20H2 and other systems were we hit a bug with UAC prompts from the exploit DLL itself not triggering the payload 2022-04-05 19:16:48 -05:00
usiegl00 27c8210b27 Update smb_shadow module to fix rubocop errors
Use msftidy to fix the rubocop errors.
2022-04-06 07:12:46 +09:00
usiegl00 8495bff61c Merge master and update the smb_shadow module
Add comments detailing the technique used to attack SMBv3. Remove some
comments that are no longer needed. Fix Gemfile.lock conflict.
2022-04-06 07:06:45 +09:00
space-r7 a43bfc9292 use safari version with specific cve 2022-04-05 10:31:51 -05:00
space-r7 4c8c32b3ff set file header to Contents dir, check safari vers 2022-04-05 10:16:59 -05:00
usiegl00 09ae52fecd Update smb_shadow and shadow_mitm_dispatcher
Remove duplicated print_status messages. Use respond_to? instead of
methods.include?. Simplify payload generation. Fix naming for the rst
capture thread.
2022-04-05 20:03:14 +09:00
Grant Willcox db4b22df5e Update the exploit code to output errors in a better format, and fix a potential issue when trying to delete folders recursively. Also update exploit module to try kill msiexec.exe if its still running to prevent it holding onto handles when it shouldn't be. 2022-04-04 17:58:52 -05:00
Grant Willcox bba40bcd21 Add in fixes from code review 2022-04-04 12:05:21 -05:00
Grant Willcox 7e5123cd24 Add initial code from Hajap Zairy Al-Sharif 2022-04-04 11:56:14 -05:00
Alexander Neumann 642bb12505 postgres_copy_from_program_cmd_exec: Quote table name
In about 16% of all cases the random value of "tablename" will be set to
a value starting with a number, which needs to be quoted before the
query is sent to the postgres server. Otherwise the query fails with the
message "Exploit failed". This is what happened to me, you can see an
example with a table name set manually here:

    msf6 > use exploit/multi/postgres/postgres_copy_from_program_cmd_exec
    [*] Using configured payload cmd/unix/reverse_perl
    msf6 exploit(multi/postgres/postgres_copy_from_program_cmd_exec) > set RHOSTS 192.168.2.2
    RHOSTS => 192.168.2.2
    msf6 exploit(multi/postgres/postgres_copy_from_program_cmd_exec) > set tablename 123test
    tablename => 123test
    [...]
    msf6 exploit(multi/postgres/postgres_copy_from_program_cmd_exec) > run

    [*] Started reverse TCP handler on 192.168.2.1:4444·
    [*] 192.168.2.2:5432 - 192.168.2.2:5432 - PostgreSQL [...]
    [*] 192.168.2.2:5432 - Exploiting...
    [!] 192.168.2.2:5432 - 192.168.2.2:5432 - Unable to execute query: DROP TABLE IF EXISTS 123test;
    [-] 192.168.2.2:5432 - Exploit Failed

This can be verified manually as follows, quoting the table name works:

    $ psql --user postgres -W -h 192.168.2.2 template1
    [...]
    template1=# DROP TABLE IF EXISTS 123test;
    ERROR:  syntax error at or near "123"
    LINE 1: DROP TABLE IF EXISTS 123test;
                                 ^
    template1=# DROP TABLE IF EXISTS "123test";
    NOTICE:  table "123test" does not exist, skipping
    DROP TABLE

With the patch, the script also works with table names which start with
numbers:

    msf6 exploit(multi/postgres/postgres_copy_from_program_cmd_exec) > run

    [*] Started reverse TCP handler on 192.168.2.1:4444
    [*] 192.168.2.2:5432 - 192.168.2.2:5432 - PostgreSQL [...]
    [*] 192.168.2.2:5432 - Exploiting...
    [+] 192.168.2.2:5432 - 192.168.2.2:5432 - 123test dropped successfully
    [+] 192.168.2.2:5432 - 192.168.2.2:5432 - 123test created successfully
    [+] 192.168.2.2:5432 - 192.168.2.2:5432 - 123test copied successfully(valid syntax/command)
    [+] 192.168.2.2:5432 - 192.168.2.2:5432 - 123test dropped successfully(Cleaned)
    [*] 192.168.2.2:5432 - Exploit Succeeded

    [*] Command shell session 1 opened (192.168.2.1:4444 -> 192.168.2.2:51734 ) at 2022-03-24 10:15:33 +0100
2022-04-04 10:32:01 +02:00
usiegl00 7e010cbde2 Merge master and update smb_shadow + dispatcher
The smb_shadow module can confirm the server smb version supported with
the ConfirmServerDialect option. The shadow_mitm_dispatcher closes each
stream before opening a new one to prevent leaking file descriptors.
2022-04-02 10:39:02 +09:00
space-r7 e9e1e26def add support for CVE-2022-22616, update docs 2022-04-01 17:50:33 -05:00
Grant Willcox 57473850c1 Fix up RuboCop errors as last change made it so that we had an unless elsif statement which isn't valid in Ruby 2022-03-31 12:52:16 -05:00
Grant Willcox 743138abed Add in initial fixes from review and remove extra BREAKAWAY_FROM_JOB code changes not directly related to this PR as we'll raise a separate PR for those 2022-03-31 12:13:29 -05:00