Commit Graph

48 Commits

Author SHA1 Message Date
sfewer-r7 60bc412026 file_dropper_exist? needs to test if teh path if either a file or a directory, the logic for shell sessions on wqindows is testing if a path if a file and not a directory. this is wrong. Origionally FileDropper only supported cleaningup files, so this logic made sense (it was copied over from teh File post moduile) but FileDropper has since supported directories so teh logic here neds to reflect that. 2024-02-19 09:12:17 +00:00
sfewer-r7 3483419d50 file_dropper_exist? was broken on the windows platform, so files registered for cleanup were not being deleted. We must call session.shell_command_token 2024-02-16 10:09:07 +00:00
Christophe De La Fuente 0b7a1bfcf7 Use #dup instead of #clone #2 2023-10-17 12:39:23 +02:00
Christophe De La Fuente 5f438f729d Use #dup instead of #clone 2023-10-17 12:19:03 +02:00
Christophe De La Fuente 2232877d03 Properly clone the path strings before storing them 2023-09-26 13:26:02 +02:00
Ashley Donaldson f54f03fc92 Prevent payloads being used if can't clean up files 2021-11-17 15:40:16 +11:00
adfoster-r7 39ca4660a9 Add meterpreter compatibility metadata to screenshare module 2021-09-15 17:34:57 +01:00
Tim W ddd1d37d4b fix module description 2021-09-15 16:25:18 +01:00
adfoster-r7 059e39a6f0 Specify meterpreter compatibility command requirements 2021-09-08 22:59:25 +01:00
Adam Galway 1a2bf98222 creates standard elog & updates exisiting usages 2020-06-22 12:48:39 +01:00
bwatters-r7 05ffa6e4a0 More updates, optimizations, and style fixes 2019-07-29 16:29:32 -05:00
bwatters-r7 7c2d214af2 Clean up debugging, move options to one place and delete superflous file
change the uuid handing to prevent changes to it when it gets put in payloads
2019-07-25 19:45:05 -05:00
bwatters-r7 310533f96c First stab at filtering payloads that require cleanup 2019-07-25 19:44:09 -05:00
bwatters-r7 80dbef20f2 Follow acammack's guidance for excluding filedropped exploits
usage of pingback payloads
2019-07-25 19:43:14 -05:00
William Vu da23432745 Update cleanup method to check CWD 2018-01-31 16:19:43 -06:00
William Vu e60aeca2db Pass in session to CWD check
Oops, used to this being accessible universally. Not the case here.
2018-01-31 16:19:43 -06:00
William Vu 199a7cc134 Check for subdirectories and relative paths 2018-01-31 16:19:43 -06:00
William Vu 09d931e392 Split assignment across two lines for clarity
https://github.com/bbatsov/ruby-style-guide#use-if-case-returns
2018-01-31 16:19:43 -06:00
William Vu 15ff70fbda Add warning to FileDropper for deleting CWD 2018-01-31 16:19:43 -06:00
William Vu 461f1c12e6 Fix nil bug(s) by moving arrays to initialize 2018-01-06 02:31:16 -06:00
William Vu 14143c2b90 Fix missed file_dropper_win_path 2018-01-06 01:44:25 -06:00
William Vu 50f4ebb3b2 Add register_dirs_for_cleanup to FileDropper 2018-01-04 11:06:32 -06:00
OJ 0737d7ca12 Tidy code, remove regex and use comparison for platform checks 2016-10-29 13:41:20 +10:00
wchen-r7 0c608e2a4c Change doc for boolean args 2015-06-26 12:01:53 -05:00
jvazquez-r7 ea8e62f0fb Add #file_dropper_file_exist? 2015-05-18 14:13:12 -05:00
jvazquez-r7 129ed7fb7a Add yard documentation 2015-05-18 10:27:04 -05:00
jvazquez-r7 0fb21af247 Verify deletion at on_new_session moment 2015-05-11 18:56:18 -05:00
jvazquez-r7 b1dd2a63fc On new session, check if file has been REALLY deleted 2015-05-11 17:14:42 -05:00
jvazquez-r7 ecb23d09cc Do initial fix 2015-05-11 15:02:46 -05:00
root 51dd88114b Fix grammer in comments 2015-04-13 13:21:41 +05:00
Christian Mehlmauer 428df19739 Changed message 2014-06-02 17:28:09 +02:00
Christian Mehlmauer 03b4a29662 Clarify filedropper error message 2014-05-31 22:17:32 +02:00
jvazquez-r7 7d1dc3746f Use the @schierlm's command 2013-10-22 16:19:49 -05:00
jvazquez-r7 4ad9bc5efe Try to [FixRM #8510] 2013-10-22 08:42:14 -05:00
Meatballs d4043a6646 Spaces and change to filedropper 2013-09-05 20:41:37 +01:00
Meatballs c5daf939d1 Stabs tabassassin 2013-09-05 20:36:52 +01:00
Meatballs 1471a4fcef Fixes an error in file_dropper where @dropped_files is nil
causing an exception to be raised and on_new_session to fail.

I have moved super to the top of the chain so it always gets
called regardless.
2013-09-03 23:45:41 +01:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
sinn3r 5b0ae1476b Let's word this a little differently 2013-04-25 20:52:51 -05:00
Meatballs b58a775af5 Added opt delay to file_dropper 2013-04-25 20:52:51 -05:00
James Lee b72d2b59f8 Add logging in case of exceptions during rm 2013-02-18 18:02:51 -06:00
James Lee e535a3e93f Guard against running broken method on non-windows
This just puts a bandaid around the issue and makes it so FileDropper
doesn't completely break java and posix meterpreter sessions.

[SeeRM #7721]
2013-02-07 21:10:27 -06:00
jvazquez-r7 087ff328b6 correct comments documentation 2012-11-28 22:18:56 +01:00
jvazquez-r7 17518f035c support for local exploits on file_dropper 2012-11-28 22:17:27 +01:00
James Lee 2526dce20a Add attrib.exe for removing read-only files
This really should be a standard part of session.fs.file.rm
2012-11-19 15:18:03 -06:00
James Lee 591b085858 Add support for shell sessions in FileDropper 2012-11-16 15:51:54 -06:00
James Lee 3363475f99 Fix backwards order of @param comment 2012-11-15 17:55:17 -06:00
James Lee 83708a5a48 Add a FileDropper mixin for recording cleanup targets
Doesn't cover shell sessions yet, so needs a bit more work
2012-11-15 17:52:10 -06:00