1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-08 14:36:22 +01:00
Commit Graph

320 Commits

Author SHA1 Message Date
RageLtMan
035531c35c This commit adds in-memory substitution for x64
Initial commit of in-mem-exe.c modifications for Windows x64.
Initial boolean wrapper checks to see if the image supplied is a
valid 64bit PE and calls a 64bit injection function. wow64 not yet
implemented.

64bit execution is a bit tricky since we can't get the entrypoint
of the existing thread from ThreadContext.Eax and we need to make
sure that our images are properly aligned. The 64 bit mapper is
based on MemExec64 source code by Steve10120 [at] icode.org.

TODO:
Write wow64 based injector. Write conditional to check that
source and destination images are the same architecture and call
the arch appropriate injection method.
Write "Heaven's Gate" based injector for running x86 process in
x64 space.
2013-03-20 18:45:08 -04:00
James Lee
ceb6812b15 Add missing hook.dll
Hopefully the last obstacle to compiling on Windows.
2013-03-20 14:19:21 -05:00
James Lee
f3718b6e0a Make VisualStudio happy with an output dir 2013-03-20 14:10:22 -05:00
James Lee
3f551d3430 Tell travis we need gcc-multilib 2013-03-20 10:33:59 -05:00
James Lee
e004437a02 More Makefile clean up
You can now type 'make && make install' if your framework checkout is in
the same directory as meterpreter.
2013-03-19 17:10:13 -05:00
James Lee
5991f42f0b Explain building on POSIX 2013-03-19 10:30:41 -05:00
James Lee
247e3d8006 Use a proper Makefile for libc 2013-03-14 13:18:44 -05:00
James Lee
e9e8733507 Whitespace at EOL 2013-03-06 18:13:37 -06:00
James Lee
a010cdc584 Remove tags 2013-03-06 18:12:24 -06:00
James Lee
b3a944e146 Add tags to .gitignore 2013-03-06 18:11:11 -06:00
Joshua Drake
b820d3ec74 Posix meterpreter makefile changes
* Cleans more things
* No longer removes outputs on clean
* Changes tmp directory to be more descriptive
2013-02-22 17:55:56 -06:00
James Lee
d30655d60c Tell travis to notify build status in IRC 2013-02-21 10:33:12 -06:00
James Lee
861f32f223 Add missing .lib files
This should make it possible for folks to compile for Windows again.
2013-02-21 10:18:25 -06:00
James Lee
bfe9ce69bf Tell travis to use jam 2012-11-19 18:17:11 -06:00
James Lee
e66ee8408d Make it clear this repo is experimental 2012-11-19 18:14:20 -06:00
James Lee
441f00bf36 Add travis.yml 2012-11-19 17:59:51 -06:00
James Lee
e147ea40b3 Fix Makefile and add missing so2h.pl 2012-11-19 17:56:44 -06:00
James Lee
7283131279 Initial source import from metasploit-framework 2012-11-19 16:46:07 -06:00
jlee-r7
964bae0c49 Initial commit 2012-11-19 14:40:03 -08:00
James Lee
9f6554138d Land #1217, java payload build system refactor
[Closes #1217]
2013-04-11 13:10:03 -05:00
Joshua J. Drake
75fdad51f9 Revert "Change temporary directory name, clean more things"
This reverts commit 302f20e089f3c1a462e12d6ed3b6f72292024e7f.
2013-01-07 22:04:38 -06:00
Joshua J. Drake
2ab5a9c61c Revert "Do not remove outputs on clean"
This reverts commit 3f2430a8a07ade5d727b9c119fdf64ae0831fc47.
2013-01-07 22:04:27 -06:00
Joshua J. Drake
9cc24262da Do not remove outputs on clean 2012-12-29 00:55:41 -06:00
Joshua J. Drake
5e3785e60c Change temporary directory name, clean more things 2012-12-29 00:49:10 -06:00
Michael Schierl
bb63a3424b Move Java meterpreter next to JavaPayload
to make further refactoring easier
2012-12-20 22:28:25 +01:00
HD Moore
be9d57454f Add placeholder directories for PSSDK 2012-11-28 15:10:35 -08:00
m m
b7a464292c I was pretty sure to have removed those fclose before 2012-09-12 13:11:24 -05:00
m m
c8b85f9587 fix netstat program name 2012-09-12 13:11:24 -05:00
m m
2860d0481e fix netstat program name 2012-09-12 13:11:24 -05:00
James Lee
e3915b99e4 Whitespace at EOL 2012-08-28 17:02:37 -05:00
James Lee
1e943bd72b Fix crash with long exe name in process list
Instead of invoking the Watson crashamajigger when the process
associated with a connection has a long executable name, truncate to the
length available in the buffer.

[See #609]
2012-08-28 17:02:37 -05:00
m m
b30af5d632 fix typo 2012-08-28 17:02:37 -05:00
m m
5059a1f3cc netstat and arp commands in win32/posix meterpreter 2012-08-28 17:02:37 -05:00
James Lee
70452fb2c6 Store the value, not the comparison
Fixes client.sys.process.execute for posix, which previously (since
2010!) would always return nil, or a single byte. This makes sense
considering the value of bytesRead would always be either 0 or 1 because
it was being assigned the result of the comparison instead of the return
value of read().

[Fixes #681]
2012-08-09 18:18:45 -06:00
James Lee
f2b0ec8a3c Return the PID as handle in posix
Fixes some TypeError exceptions when attempting most operations on
spawned processes, e.g.:

  p = client.sys.process.execute("/bin/sh", nil, "Channelized"=>true)
  p.close
  # raises TypeError: can't convert nil into Integer

[FIXRM #7005]
2012-08-08 15:23:00 -06:00
m m
3e40282718 Really limit packet count and data in linux sniffer
Squashed commit of the following:

commit 57795ff9c33a53167fca85845b96b82b5c92315f
Author: James Lee <egypt@metasploit.com>
Date:   Wed Aug 1 14:13:20 2012 -0600

    Add recompiled sniffer bin for linux

commit 0e11fdb06fcb9771a11eb631e6f10ec7a2d315f3
Author: m m <gaspmat@gmail.com>
Date:   Thu Jul 12 15:08:10 2012 +0200

    really limit packet count and data in linux sniffer

[Closes #605]
2012-08-01 14:16:00 -06:00
James Lee
bb4a71413d Squashed commit of the following:
commit 1de16b41c8808df2919706eaa8cc89ae44d9b591
Author: m m <gaspmat@gmail.com>
Date:   Mon Jul 9 21:55:32 2012 +0200

    typo

commit a396b55018175f3eb2a83baecb1ec601cc99eef4
Author: m m <gaspmat@gmail.com>
Date:   Mon Jul 9 21:51:32 2012 +0200

    various posix meterpreter bugfixes

[Closes #584]
[FIXRM #7042]
2012-07-19 15:56:47 -06:00
m m
28e2f0774b Squashed commit of the following:
commit f0a1d2ad004e5c77cc4d5dcc71935aa530f1729f
Author: m m <gaspmat@gmail.com>
Date:   Tue Jul 17 11:56:43 2012 +0200

    linux meterpreter : correct netmask computation

[Closes #613]
2012-07-19 14:22:39 -06:00
Stephen Fewer
b01441e943 force the eip() function to never be inlined under x64 in order to avoid an error being introduced when some unexpected compiler flags are being used. Now the compiler flags used (/O1, /O2, ...) shouldnt pose any problem 2012-07-02 17:40:57 +01:00
HD Moore
8944d31dc9 Switch to METERPRETER_UA as intended 2012-07-02 00:02:47 -05:00
HD Moore
d0b740d2c6 Add support for user-agent control 2012-06-30 23:00:08 -05:00
HD Moore
5184f3f718 Update project 2012-06-24 14:03:58 -05:00
HD Moore
7faaa653ba Update project 2012-06-24 14:03:57 -05:00
HD Moore
78be47c5d1 Remove left over debug statements 2012-06-24 14:03:56 -05:00
HD Moore
8a1193cef1 Add missing project files 2012-06-24 14:03:54 -05:00
HD Moore
be60c294d0 Checkin new code 2012-06-24 14:03:53 -05:00
HD Moore
cdc46ef14f Commit EncodePointer stubs as a reference (temporary) 2012-06-24 14:03:52 -05:00
HD Moore
cfa29916ce Move builds to VC10 2012-06-21 23:51:46 -05:00
HD Moore
38adad2ca7 Add Windows 8 / Server 2012 support to sysinfo 2012-06-21 23:50:29 -05:00
James Lee
ffbd2a8aad Fixes command parsing in Post::Common
The meterpreter API wants arguments in a seperate string (not an array,
mind you) just so it can concatenate them on the server side.
Originally, I worked around that by using Shellwords.shellwords to pull
out the first token. But! Shellwords.shellwords inexplicably and
inexcusably removes backslashes in ways that make it impossible to quote
things on Windows. This commit works around both of those things.
2012-06-07 22:24:59 -06:00