Commit Graph

47 Commits

Author SHA1 Message Date
William Vu 7e9bd506d6 Add generate -v to optionally show payload stage 2020-02-13 16:33:48 -06:00
L 0876b8e7d7 enhancement payload generate raw 2020-01-11 19:43:04 +08:00
William Vu 141350dbc1 Update help 2019-08-14 21:28:13 -05:00
William Vu 25a66a245f Prefer import_options_from_s over manual parsing 2019-08-14 21:08:00 -05:00
William Vu e20d9e8c4f Fix another typo 2019-08-14 21:04:06 -05:00
William Vu f81a326ac1 Fix typo 2019-08-14 20:43:40 -05:00
William Vu a53fe44d8e Properly parse option string anyway with -o 2019-08-14 20:32:53 -05:00
William Vu 45747c45f7 Remove extraneous -s NOP sled option 2019-08-14 20:32:31 -05:00
William Vu e3463d0cd8 Prefer Rex::Text.dehex over Rex::Text.hex_to_raw 2019-08-14 20:32:30 -05:00
Patrick 5151473e09 Implement sec-name and pad-nops for command dispatcher 2019-02-13 13:35:42 -06:00
Brent Cook f32020f255 include some training wheels for users 2018-05-23 13:37:53 -05:00
Brent Cook fbbfa0e0c3 teach exploit how to parse datastore options too 2018-05-23 12:12:27 -05:00
Brent Cook d8e5cc60bb add inline datastore setting for msfvenom/generate commands 2018-05-23 11:48:11 -05:00
Brent Cook c52e96bfa7 swizzle parameters in generate to match msfvenom 2018-05-23 11:48:11 -05:00
Spencer McIntyre fb7635502d Tab completion for exploit and handler commands 2017-11-11 17:11:54 -05:00
Spencer McIntyre 68a43fef36 Add the new generic tab completion functoin 2017-11-11 16:47:11 -05:00
Spencer McIntyre d815e42ccf Add a generic tab completion function 2017-11-01 20:38:45 -04:00
Spencer McIntyre 1462330f34 Add tab completion to the payload generate command 2017-10-31 20:33:31 -04:00
Brent Cook 35bb725f19 rubocop fixes for payload dispatcher 2017-01-02 15:39:48 -06:00
Luis Fontes cb0a7986bf Added to_handler command
This commit adds a "to_handler" command to msfconsole when "using" a payload.

After generating a payload from msfconsole, we needed to set multi/handler and the payload with the same param as we used to generate it. That was really boring...
The to_handler command creates the handler and sets the payload and the options set for it.

### Example Output:





```
msf > use payload/windows/meterpreter_reverse_tcp 
msf payload(meterpreter_reverse_tcp) > set LHOST 10.0.1.109
LHOST => 10.0.1.109
msf payload(meterpreter_reverse_tcp) > set LPORT 3377
LPORT => 3377
msf payload(meterpreter_reverse_tcp) > show options

Module options (payload/windows/meterpreter_reverse_tcp):

   Name        Current Setting  Required  Description
   ----        ---------------  --------  -----------
   EXITFUNC    process          yes       Exit technique (Accepted: '', seh, thread, process, none)
   EXTENSIONS                   no        Comma-separate list of extensions to load
   EXTINIT                      no        Initialization strings for extensions
   LHOST       10.0.1.109       yes       The listen address
   LPORT       3377             yes       The listen port

msf payload(meterpreter_reverse_tcp) > to_handler
[*] Payload Handler Started as Job 0
[*] Started reverse TCP handler on 10.0.1.109:3377 
[*] Starting the payload handler...
msf payload(meterpreter_reverse_tcp) > 
```
2016-12-28 20:03:40 +00:00
Brent Cook d091a32be8 whitespace/indentation 2016-12-06 16:37:22 -06:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
James Lee f4498c3916 Remove $Id tags
Also adds binary coding magic comment to a few files
2013-05-20 16:21:03 -05:00
Luke Imhoff c210260845 Fix Undocumentable method, missing name YARD warning
[#46491831]

Comments at the start of the file with ## caused YARD to think the
comment was documenting the require call.  By removing the ##, the
warning disappeared.  I did not determine what is special about ## in
file comments.
2013-03-30 15:32:38 -05:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
James Lee bf105f48cb massive removal of spaces at EOL and some bad tabs 2011-11-20 12:32:06 +11:00
HD Moore 9ce47c01bd Reverting the autoload changes until we can upgrade to a new ActiveSupport library or find a workaround
git-svn-id: file:///home/svn/framework3/trunk@12600 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-12 20:03:55 +00:00
James Lee 06779bc8c0 remove unnecessary requires for stuff in rex. autoload and a high-level require 'rex' in lib/msf/core.rb should take care of everything. see #4371, #4373, r12587, and r12554.
git-svn-id: file:///home/svn/framework3/trunk@12588 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-12 00:53:33 +00:00
James Lee a7b5e831f7 clean up how help works, pull cmd_reload up so all module types can use it
git-svn-id: file:///home/svn/framework3/trunk@11658 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-28 03:29:20 +00:00
Joshua Drake 8e5cf31e9a big exe/dll update, see #2017
NOTE: These changes specifically affect payload encoding via RPC, "use
payload", and msfencode

1. consolidate user-specified exe generation routine (now
Msf::Util::EXE.to_executable_fmt)
2. supported format types are now queried/checked using arrays
3. cleaned up and standardized exe option passing
4. rename data store options for EXE mixin
5. add generate_payload_exe_service for psexec/smb_relay
6. reworked default template handling in Msf::Util::EXE
  a. added template search path option (not used if template includes
a path separator)
  b. "fallback" flag to enable using default if specified file doesn't
exist
7. added Msf::Util::EXE.to_win64pe_dll
8. improved error messages from exe generation



git-svn-id: file:///home/svn/framework3/trunk@10404 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-21 00:13:30 +00:00
James Lee e957a7a90e add support for doing everything msfpayload does into msfconsole and xmlrpc, fixes #589. Thanks, Ryan Linn for the patch
git-svn-id: file:///home/svn/framework3/trunk@9914 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-23 20:22:36 +00:00
Ramon de C Valle f124597a56 Code cleanups
git-svn-id: file:///home/svn/framework3/trunk@5773 4d416f70-5f16-0410-b530-b9f4589650da
2008-10-19 21:03:39 +00:00
James Lee e1a25c1383 payload generate now honors ENCODER instead of requiring -e
git-svn-id: file:///home/svn/framework3/trunk@5508 4d416f70-5f16-0410-b530-b9f4589650da
2008-05-19 23:56:17 +00:00
HD Moore d931374844 Add -f to generate. Add SMBUser/SMBPass options to psexec (regular vs advanced)
git-svn-id: file:///home/svn/framework3/trunk@5354 4d416f70-5f16-0410-b530-b9f4589650da
2008-01-25 23:24:06 +00:00
Matt Miller 5676117bff last of normalized docs from last night
git-svn-id: file:///home/svn/incoming/trunk@3030 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-15 15:11:43 +00:00
Matt Miller 2ac47328e0 restructured things to encourage better code re-use
git-svn-id: file:///home/svn/incoming/trunk@2757 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-14 22:45:10 +00:00
Matt Miller 17b00814c6 added check
git-svn-id: file:///home/svn/incoming/trunk@2756 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-14 20:36:34 +00:00
Matt Miller 91e8ca14d1 formatting of help
git-svn-id: file:///home/svn/incoming/trunk@2755 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-14 20:18:36 +00:00
Matt Miller 55516ba790 more pimpage, added an internal test exploit
git-svn-id: file:///home/svn/incoming/trunk@2752 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-14 07:32:11 +00:00
Matt Miller d62566a68f lots of changes, making the simple wrapper better, lots of improvements
git-svn-id: file:///home/svn/incoming/trunk@2750 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-14 06:34:58 +00:00
Matt Miller 3aaeeca644 moved hex to raw
git-svn-id: file:///home/svn/incoming/trunk@2749 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-13 23:01:34 +00:00
Matt Miller 72ad97dfd1 fixed up encoding, made payload generation pimper
git-svn-id: file:///home/svn/incoming/trunk@2746 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-13 21:09:07 +00:00
Matt Miller f1975a4b0f tearing up the house, fixed some invalid exception names, payload encoding rocks
git-svn-id: file:///home/svn/incoming/trunk@2712 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-10 19:35:46 +00:00
Matt Miller 8dc1128b3c more cool shit
git-svn-id: file:///home/svn/incoming/trunk@2711 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-10 19:21:40 +00:00
Matt Miller eba7bb2a6d ver
git-svn-id: file:///home/svn/incoming/trunk@2710 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-10 10:41:11 +00:00
Matt Miller ca1dab5f27 payload generation
git-svn-id: file:///home/svn/incoming/trunk@2708 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-10 10:08:10 +00:00
Matt Miller 01aff25bd0 how you like me now, gold teef when I smile
git-svn-id: file:///home/svn/incoming/trunk@2703 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-10 07:15:20 +00:00