Comments (4)
I really like the idea, I'm just not sure if this needs to be a different command, or if we can embed this into the already existing filecompare function. Filecompare assumes binary input, but using a switch we can have it treat the input as being a different format too?
from mona.
Indeed, merging with existing command is a better idea(less confusion for user too). I've made a few changes to the code. It should now be able to correctly distinguish between a binary file(created using command bytearray or any RAW file) and other formatted text input(even when no format type (-t) argument is supplied)
some testing i've done so far:
- supplying bytearray.bin (no -t argument supplied)
!mona compare -a 0019F5B7 -f D:\tmp\bytearray.bin
- supplying bytearray.bin (with "-t raw" argument supplied)
!mona compare -a 0019F5B7 -f D:\tmp\bytearray.bin -t raw
- supplying msfvenom-python.txt (no -t argument supplied) (generated using msfvenom)
!mona compare -a 0019F5B8 -f D:\tmp\msfvenom-python.txt
- supplying msfvenom-python.txt (with "-t msfvenom-python" argument supplied) (generated using msfvenom)
!mona compare -a 0019F5B8 -f D:\tmp\msfvenom-python.txt -t msfvenom-python
content of msfvenom-python.txt
[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
[-] No arch selected, selecting arch: x86 from the payload
Found 10 compatible encoders
Attempting to encode payload with 1 iterations of x86/shikata_ga_nai
x86/shikata_ga_nai succeeded with size 368 (iteration=0)
x86/shikata_ga_nai chosen with final size 368
Payload size: 368 bytes
Final size of py file: 1772 bytes
buf = ""
buf += "\xda\xc7\xbd\x77\xea\x7a\x3c\xd9\x74\x24\xf4\x5e\x31"
buf += "\xc9\xb1\x56\x31\x6e\x18\x03\x6e\x18\x83\xc6\x73\x08"
buf += "\x8f\xc0\x93\x4e\x70\x39\x63\x2f\xf8\xdc\x52\x6f\x9e"
buf += "\x95\xc4\x5f\xd4\xf8\xe8\x14\xb8\xe8\x7b\x58\x15\x1e"
buf += "\xcc\xd7\x43\x11\xcd\x44\xb7\x30\x4d\x97\xe4\x92\x6c"
buf += "\x58\xf9\xd3\xa9\x85\xf0\x86\x62\xc1\xa7\x36\x07\x9f"
buf += "\x7b\xbc\x5b\x31\xfc\x21\x2b\x30\x2d\xf4\x20\x6b\xed"
buf += "\xf6\xe5\x07\xa4\xe0\xea\x22\x7e\x9a\xd8\xd9\x81\x4a"
buf += "\x11\x21\x2d\xb3\x9e\xd0\x2f\xf3\x18\x0b\x5a\x0d\x5b"
buf += "\xb6\x5d\xca\x26\x6c\xeb\xc9\x80\xe7\x4b\x36\x31\x2b"
buf += "\x0d\xbd\x3d\x80\x59\x99\x21\x17\x8d\x91\x5d\x9c\x30"
buf += "\x76\xd4\xe6\x16\x52\xbd\xbd\x37\xc3\x1b\x13\x47\x13"
buf += "\xc4\xcc\xed\x5f\xe8\x19\x9c\x3d\x64\xed\xad\xbd\x74"
buf += "\x79\xa5\xce\x46\x26\x1d\x59\xea\xaf\xbb\x9e\x7b\xa7"
buf += "\x3b\x70\xc3\xa8\xc5\x71\x33\xe0\x01\x25\x63\x9a\xa0"
buf += "\x46\xe8\x5a\x4c\x93\x84\x50\xda\xdc\xf0\x6f\x70\xb5"
buf += "\x02\x70\x95\x19\x8b\x96\xc5\xf1\xdb\x06\xa6\xa1\x9b"
buf += "\xf6\x4e\xa8\x14\x28\x6e\xd3\xff\x41\x05\x3c\xa9\x3a"
buf += "\xb2\xa5\xf0\xb1\x23\x29\x2f\xbc\x64\xa1\xc5\x40\x2a"
buf += "\x42\xac\x52\x5b\x35\x4e\xab\x9c\xd0\x4e\xc1\x98\x72"
buf += "\x19\x7d\xa3\xa3\x6d\x22\x5c\x86\xee\x25\xa2\x57\xc6"
buf += "\x5e\x95\xcd\x66\x09\xda\x01\x66\xc9\x8c\x4b\x66\xa1"
buf += "\x68\x28\x35\xd4\x76\xe5\x2a\x45\xe3\x06\x1a\x39\xa4"
buf += "\x6e\xa0\x64\x82\x30\x5b\x43\x90\x37\xa3\x11\xbf\x9f"
buf += "\xcb\xe9\xff\x1f\x0b\x80\xff\x4f\x63\x5f\x2f\x7f\x43"
buf += "\xa0\xfa\x28\xcb\x2b\x6b\x9a\x6a\x2b\xa6\x7a\x32\x2c"
buf += "\x45\xa7\xc5\x57\x26\x58\x26\xa8\x2e\x3d\x27\xa8\x4e"
buf += "\x43\x14\x7e\x77\x31\x5b\x42\xcc\x4a\xee\xe7\x65\xc1"
buf += "\x10\xbb\x76\xc0"
p/s: i've been working on the merge with command "compare" instead of "filecompare". I think we are on the same page?
from mona.
any thoughts if the "compareUsage" need to be improved further?
from mona.
awesome work, thank you for your help and for submitting the PR. changes have been merged into mona.py ! :)
from mona.
Related Issues (20)
- pycommands: error importing module ( HOT 23
- Failed to Import Module HOT 2
- crach at command "mona rop -m ntdll" HOT 4
- Incorrect last conditional jump into egghunter with checksum verification HOT 4
- !mona modules got nothing in Immunity Debugger HOT 3
- dll load failed 1 is not a valid win32 application HOT 5
- Invalid opcode when searching for possible gadgets HOT 5
- Inventory notification HOT 1
- Error while creating a ROP gadget HOT 4
- mona.py hangs at step 1 of 7 during ROP gadget generation; error trying to process kernel32 and kernelbase.dll HOT 2
- Migrate to Python3 HOT 2
- Project documentation HOT 1
- Add Python2.7 shebang HOT 2
- Mona failed to produce ropchain, got exception errors regarding IAT HOT 30
- 'compare' does not search file in workingfolder HOT 3
- pycommands: error importing module HOT 2
- jmp esp error Windows XP HOT 10
- mona rop Error HOT 6
- Using Mona in other python scripit but still have Immunity Debguer Runing in the background
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mona.