Commit Graph

33711 Commits (74ea85fe8424148459f5951831f72d411c48934c)

Author SHA1 Message Date
Brent Cook 66bd881ac5 support filtering on processes with a regex
from @sempervictus

Merge forked changes to cmd_ps allowing for the use of string
matching on listing output via Rex::Ui::Text::Table's SearchTerm
facility

Example:
```
meterpreter > ps -S x64.*Auth.*Sys

Process list
============

 PID   Name                       Arch  Session  User                          Path
 ---   ----                       ----  -------  ----                          ----
 400   smss.exe                   x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\smss.exe
...
```
2015-05-20 11:25:56 -05:00
Brent Cook d97ad5f8e4 support more consistent table output formatting
from @sempervictus
2015-05-20 11:25:55 -05:00
Brent Cook 8a0bb6735e support creating Rex Tables from CSV
from @sempervictus
2015-05-20 11:25:53 -05:00
Brent Cook 3d27443ef6 support flipping a table 90 degrees
from @sempervictus

This allows displaying large attributes in a nicer way.
2015-05-20 11:25:48 -05:00
Brent Cook 1fe18243bd Allow Internal Filtering by SearchTerm
from @sempervictus

Allow passing 'SearchTerm' into Rex::Ui::Text::Table creation to
filter all output by regex match to the string passed.
Provides base functionality for higher level subscribers such as
cmd_ls in meterpreter sessions for filtering output
2015-05-20 11:25:39 -05:00
Brent Cook 6fd82ad996 add cp / copy commands
from @sempervictus
2015-05-20 11:25:36 -05:00
Brent Cook 282c7eb81e add -S regex search to ls, normalize arg parsing
from @sempervictus

Merge forked changes to cmd_ls allowing for the use of string
matching on listing output via Rex::Ui::Text::Table's SearchTerm
facility.

Example:

```
meterpreter > ls chef -R -S wget
No entries exist in chef/backup/chef/handlers
No entries exist in chef/backup/chef/ohai_plugins
No entries exist in chef/backup/chef
No entries exist in chef/backup
No entries exist in chef/cache/cookbooks/avast/attributes
No entries exist in chef/cache/cookbooks/avast/recipes
No entries exist in chef/cache/cookbooks/avast
No entries exist in chef/cache/cookbooks/chef-client/attributes
No entries exist in chef/cache/cookbooks/chef-client/libraries
No entries exist in chef/cache/cookbooks/chef-client/recipes
No entries exist in chef/cache/cookbooks/chef-client
No entries exist in chef/cache/cookbooks/chef_handler/attributes
No entries exist in chef/cache/cookbooks/chef_handler/libraries
No entries exist in chef/cache/cookbooks/chef_handler/providers
No entries exist in chef/cache/cookbooks/chef_handler/recipes
No entries exist in chef/cache/cookbooks/chef_handler/resources
No entries exist in chef/cache/cookbooks/chef_handler
No entries exist in chef/cache/cookbooks/cron/providers
No entries exist in chef/cache/cookbooks/cron/recipes
No entries exist in chef/cache/cookbooks/cron/resources
No entries exist in chef/cache/cookbooks/cron
No entries exist in chef/cache/cookbooks/logrotate/attributes
No entries exist in chef/cache/cookbooks/logrotate/definitions
No entries exist in chef/cache/cookbooks/logrotate/libraries
No entries exist in chef/cache/cookbooks/logrotate/recipes
No entries exist in chef/cache/cookbooks/logrotate
No entries exist in chef/cache/cookbooks/ohai/attributes
No entries exist in chef/cache/cookbooks/ohai/files/default/plugins
No entries exist in chef/cache/cookbooks/ohai/files/default
No entries exist in chef/cache/cookbooks/ohai/files
No entries exist in chef/cache/cookbooks/ohai/recipes
No entries exist in chef/cache/cookbooks/ohai
No entries exist in chef/cache/cookbooks/svit-windows/attributes
No entries exist in chef/cache/cookbooks/svit-windows/recipes
No entries exist in chef/cache/cookbooks/svit-windows/templates/default/plugins
No entries exist in chef/cache/cookbooks/svit-windows/templates/default
No entries exist in chef/cache/cookbooks/svit-windows/templates
No entries exist in chef/cache/cookbooks/svit-windows
No entries exist in chef/cache/cookbooks/windows/attributes
No entries exist in chef/cache/cookbooks/windows/files/default/handlers
No entries exist in chef/cache/cookbooks/windows/files/default
No entries exist in chef/cache/cookbooks/windows/files
No entries exist in chef/cache/cookbooks/windows/libraries
No entries exist in chef/cache/cookbooks/windows/providers
No entries exist in chef/cache/cookbooks/windows/recipes
No entries exist in chef/cache/cookbooks/windows/resources
No entries exist in chef/cache/cookbooks/windows
No entries exist in chef/cache/cookbooks
No entries exist in chef/cache
No entries exist in chef/handlers
No entries exist in chef/log
No entries exist in chef/ohai_plugins
No entries exist in chef/run
Listing: chef
=============

Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  161   fil   2014-07-21 11:08:26 -0400  wget.ps1
100666/rw-rw-rw-  1285  fil   2014-07-21 11:08:26 -0400  wget.vbs

meterpreter >
```
2015-05-20 11:25:33 -05:00
Sonny Gonzalez edbd71ffbe Merge pull request #5381 from ccatalan-r7/bug/MSP-9532/import-web-data-expansion-error
MSP-9532 #land
2015-05-20 09:07:47 -05:00
OJ 44f8cf4124 Add more size to stagers, adjust psexec payloads
This psexec payload size should be evaluated to make sure I'm not doing
anything stupid. i can't see a reason why increasing these sizes would
be bad. They seem to work fine.
2015-05-20 17:07:56 +10:00
OJ 5963a5833a Fix up php stageless payload includes 2015-05-20 16:50:00 +10:00
OJ d0a5b803e8 Use generate_payload_uuid instead of manual obj creation 2015-05-20 16:25:52 +10:00
HD Moore 818d8b186c Implement tracking 2015-05-20 01:10:19 -05:00
OJ 289873c25f
Merge all the stager changes 2015-05-20 16:02:37 +10:00
OJ 6859b24c1c Fix missing label, update payload sizes 2015-05-20 15:42:31 +10:00
OJ d43e11f5af WinHTTP rework with proxy support, and SSL verification
This commit fixes up the winhttps stuff properly too. PHEW!
2015-05-20 15:32:34 +10:00
HD Moore 513a81e340 Add framework.uuid_db as a JSONHashFile 2015-05-20 00:28:32 -05:00
OJ fd2534914d Small tweaks to reverse_http 2015-05-20 12:15:38 +10:00
David Maloney 48c50a897c
add rpc call to change meterp transport
this rpc method allows the user to change transport
on an existing meterp session. if it's successful
it will close the old 'session' tied to the rpevious transport

MSP-12722
2015-05-19 14:43:25 -05:00
Christian Catalan 046003acb4
Increase REXML expansion text limit
MSP-9532

* Increase to reasonable size to handle larger xml file expansion on import
* Prevents the 'RuntimeError entity expansion has grown too large' error that prevents import
2015-05-19 12:47:19 -05:00
William Vu c1b8cee315
Land #5369, @dmaloney-r7's snmp_login fixes 2015-05-19 10:39:03 -05:00
OJ a93565b5d1 Add 'Payload' section with 'Size' to psexec_psh
This missing parameter was causing the payload 'Size' to come through to
the encoders as `nil`. This meant that all the stagers that were
looking at the payload sizes were being told there was no size. In the
case of the meterpreter payloads, this was causing issues with the proxy
settings because the proxy configuration detail isn't added to the
payload unless there's enough space.

This fix adds a default size of 2048 (the same as the plain psexec
module). This makes the proxy settings work as expected.
2015-05-19 22:11:29 +10:00
OJ 9fddc21cf3 Shaved another sneaky byte off the payload 2015-05-19 21:21:07 +10:00
OJ 6e96e6d118 Shellcode golf to make the payload smaller
Tried to implement some more of the stuff that egypt suggested, managed
to get some in, but not others. Ultimately, its smaller than it was, and
I'm sure there are ways to make it better as well.
2015-05-19 21:17:42 +10:00
OJ 62720ab357 Fix the wininet stager for http/s
For some reason this was only working on Windows7/2008, yet when tired
on Windows 2012 it was resulting in crashes. It was also stopping
working in exploits such as psexec_psh.

Went back to the beginning and started again. With this in place, we can
now do a bit of shellcode golf to make it a bit smaller.

Adjusted payload sizes as well.
2015-05-19 20:03:22 +10:00
jvazquez-r7 55c07b1bdd
Report credentials with create_credential_login 2015-05-19 00:14:55 -05:00
HD Moore 9d7e54f360 Add the UUID subdirectory, including initial DB class 2015-05-18 23:41:22 -05:00
HD Moore c7932855f2 Move UUIDOptions to UUID::Options 2015-05-18 23:35:18 -05:00
jvazquez-r7 d564a85f6f
Fix jtr_format 2015-05-18 19:55:48 -05:00
jvazquez-r7 f49362492a
Report hash's username correctly 2015-05-18 19:46:17 -05:00
jvazquez-r7 c6fcb9c6c5
Report credentials with create_credential_login 2015-05-18 19:39:03 -05:00
HD Moore 448736989d Merge branch 'master' into feature/msfvenom-smallest 2015-05-18 18:41:44 -05:00
Brent Cook 84060bbaeb
Land #5370, support specifying maximum encoder space with msfvenom 2015-05-18 16:43:12 -05:00
Brent Cook fb43ef4494 realign msfvenom help text 2015-05-18 16:39:52 -05:00
Brent Cook 5d085a3e13
Land #5351, use 32-bit registry view when detecting epo_sql 2015-05-18 15:48:14 -05:00
HD Moore 9dd82d94ae Exclude Manual ranked encoders from automatic selection, these can still be specified with -e 2015-05-18 15:47:15 -05:00
Brent Cook 79db696c15 fix EOL character 2015-05-18 15:46:55 -05:00
HD Moore 093ca31c7d The InvalidPayloadSizeException wasn't actually defined anywhere 2015-05-18 15:36:15 -05:00
HD Moore b0a8c77127 Switch RuntimeError -> EncodingError 2015-05-18 15:33:01 -05:00
HD Moore 7989a29203 Switch to the stock EncodingError exception 2015-05-18 15:27:31 -05:00
HD Moore 5c31586c68 Switch to the correct exception class 2015-05-18 15:25:26 -05:00
HD Moore 71eab7a236 Implements msfvenom --smallest, still some blockers 2015-05-18 15:24:59 -05:00
Brent Cook 657746c97f
Land #5364, fix endian in meterpreter config block 2015-05-18 15:23:42 -05:00
HD Moore a82168d7bb Fixes #5361 by adding --encoder-space to msfvenom 2015-05-18 14:27:52 -05:00
David Maloney 69a7a89936
use the correct print_error message
vrpint_error feeds through the old authbrute mixin
which does not behave properly anymore. use
print_error instead

5266
2015-05-18 13:51:23 -05:00
David Maloney 09d735e855
remove proof from failure message
the snmp login scanner will only have
proof on success, not on failure. remove it from
the failure message for cleaner formatting

5266
2015-05-18 13:45:01 -05:00
David Maloney 7376d4d94e
account for public only credentials in #to_s
SNMP in particular will only have a public, so we need
to account for this so we don't output poorly formed text
with a trailing ':' char

5266
2015-05-18 13:42:15 -05:00
David Maloney c69b6b2b8b
only issue db warning once
cache the fact that we have issued the db warning
so we do not issue it for every credential attempt
on the module run.

5266
2015-05-18 13:41:18 -05:00
Donny Maasland (Fox-IT) e1eed6e9d9 single quotes and slashes.. 2015-05-18 16:33:57 +02:00
OJ 820727e24d Add missing payloads to spec 2015-05-18 22:21:08 +10:00
OJ 4a5f92072e Make msftidy happy 2015-05-18 22:00:51 +10:00