Giter VIP home page Giter VIP logo

pivotal's Introduction

pivotal

Big idea

  • Inject DLL in target IE process using Metasploit's Reflective DLL Injection
  • DLL's DllMain launches a thread
  • The thread starts an HTTP proxy server
  • Proxy server listens for HTTP requests
  • HTTP CONNECT requests to port 443 are intercepted, the proxy returning "200 Connection established" then initiating handshake as the requested server
  • If request is encrypted, it is decrypted using keys established during handshake.
  • Proxy server forwards request using WinINet API thereby inheriting any associated credentials from the parent process
  • Proxy server forwards response back to original client, reencrypting response if needed.
  • Server closes when IE process ends

Current status

  • driver.exe loads DLL using LoadLibrary
  • DLL's DllMain launches a thread which starts the proxy server
  • Server listens for connections on 0.0.0.0:4040
  • Incoming requests are parsed, transmitted through WinINet, and returned
  • TLS handshakes are partially functional, but won't yet be responded to

Building

  • VS2012 solution provided, should work in 2013 too
  • Configured for 32- and 64-bit DLLs (which one do we need?)
  • Requires some C++11 features though this requirement might be removed in the future. If building in VS2012 which lacks some C++11 features, install (updated compiler)[http://www.microsoft.com/en-us/download/details.aspx?id=35515]

Testing

  • Run driver.exe. It expects a dll named pivotal.dll in the same directory.
  • After five seconds, server will start on a separate thread
  • Set proxy setting to use 0.0.0.0:4040
  • All connections will be displayed in the console
  • All non-SLL connections should work!
  • Testing in a lab enviornment verified that the proxy allows access to hosts to which there is an open session.
    • Testing scinaro used:
      • Target host is on a remote subnet that is segmented from the attacker by ACL's and stateful inspection
      • An intermediary can access the target host but only with web traffic
      • The ideal for testing would be if access to the remote host was restriced by an additional itermediary like a jump box because it is possible to mimic HTTP traffic and fool packet inspection
      • We compromise the itermediary execute our payload
      • We can now interact with any host the user has a session open to

To be done:

Steps to Creating a Payload

  • Target Vulnerability
  • Setting Up for Development
  • Choosing a Starting Point
  • Development Process Overview
  • Triggering the Vulnerability
  • Sending the Payload

pivotal's People

Contributors

pfussell avatar tfussell avatar

Watchers

 avatar  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.