Giter Club home page Giter Club logo

battlepaddle's Introduction

BattlePaddle

Still in alpha, it works but still needs a lot of cleaning up and documentation. This is a work in progress.

What is it?

BattlePaddle is a Raw Socket C2 bot for both Linux and Windows.

Dependencies?

The dependencies are as minimal as possible:

  • Linux
    • pthread on the device compiling the binary.
      • I have chosen to include all of pthread into the binary to make deployment as simple as possible. Just drop the binary and run.
  • Windows
    • Just the things found in this repo :)

Configure and Compiling

Configuration

Edit the config file found in source/bpLib/config/Config.cpp

Each configuration option in that file is as followed:

  • c2IpEdit is the IP of your C2.
    • If your C2 IP is 10.1.1.100 the line would look like:
      uint8_t c2IpEdit[4] = {10, 1, 1, 100};
  • gatewayipEdit is the IP of your this bot's gateway. Only linux uses this configuration. I am looking into alternatives to find this automatically in a way that keeps it distro agnostic.
    • If your Gateway IP is 10.1.1.1 the line would look like:
      uint8_t gatewayipEdit[4] = {10, 1, 1, 1};
  • useGateway, once again only used for linux, tells the bot whether or not there is a hop between it and the C2. Used so the bot knows what IP to arp for.
  • requestActionInterval is the rate at which the bot will request a command from the C2. This is in milliseconds.

Compilation

Both Windows and Linux create a shared library such as a .SO or .DLL and an executable. You only need to deploy and run one of them.

  • Linux

    • The build systems I use include:
      • cmake
      • g++
      • make

    An example of commands to compile:

    mkdir build
    cd build
    cmake ..
    make
  • Windows

    • The build systems used include:
      • ninja

    I build the project on windows either with Visual Studio with it's cmake build tools or VsCode using the Cmake Tools Extension

RawSocket Library

Go to source/bpLib/rawsocket to read more.

C2

Go to C2 to read more.

Alpha Timeline

  • Setup Raw sockets on linux
  • Investigate Raw sockets on windows
    • winsock
    • WinDivert
      • Receiving Packets
      • Sending Packets
  • Design BP protocol
  • Determine how Windows will interact with Linux bot
    • Recieve C2 commands via Linux bots
    • Don't send anything to avoid pcap dependency if raw sockets work
    • Get WinDivert injects to work
  • Implement ability for bots to run commands.
  • Refactor Code
  • Documentation

battlepaddle's People

Contributors

im-adriano avatar

Stargazers

Drakiat avatar  avatar  avatar  avatar Ryan Cervantes avatar Choi avatar  avatar Simon B.  avatar

Watchers

James Cloos avatar Brandon Adler avatar Simon B.  avatar  avatar

Forkers

onenutw0nder

battlepaddle's Issues

Bot stuck running commands

If a bot on linux is given the command ping 8.8.8.8 it will forever be running this command. Thus it will not execute any other commands sent by the C2. The command being run must be killed or the bot must be restarted.

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.