Skip to content

💻 A Windows console remote administration tool written in Go & Intel x86 Assembly. It supports remote shell and screenshot.

License

Notifications You must be signed in to change notification settings

Zhuagenborn/Goasm-RAT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goasm RAT

Go MASM Windows License

Languages

Introduction

cover

Goasm-RAT is a simple Windows console remote administration tool, written in Go and Intel x86 Assembly. It supports remote shell and screenshot.

Getting Started

Prerequisites

Building

Client

..\client> .\build.ps1

Server

..\server\scripts> .\build.ps1

Usage

Client

Use command line arguments to specify the IPv4 address and TCP port of the server when running the client.

client <ipv4-addr> <port>

Server

Use -p option to specify the TCP listening port, the default port is 10080.

server -p <port>

Use -h option to print the help.

-h    This help
-p int
      Listening port (default 10080)

Commands

When the server is waiting for user input, the background information or execution results will not be displayed in real-time. You need to press Enter to flush manually.

Basic Control
  • sw <client-id>

    Switch the client currently being controlled.

    > sw 1
    Sep 24 23:03:27: The current client has changed to [1].
  • exit

    Exit the server.

Shell
exec <command>

Execute a shell command on the client.

> exec whoami
>
Sep 25 00:21:38: Shell messages from the client [1]:
----------------------------------------------------
whoami
desktop-testpc1\chenzs

C:\Users\chenzs\Goasm-RAT\client>
----------------------------------------------------
Screenshot
sc

Take a screenshot of the client and save it as a .png file.

Class Diagram

classDiagram

class IoWriter {
    <<interface>>
    Write(bytes)
}

class IoReadWriter  {
    <<interface>>
    Read(bytes)
}

IoWriter <|-- IoReadWriter

class Logger  {
    <<interface>>
    Log(msg)
    Store(msg) int
}

Logger --> IoWriter

namespace network {

    class Client {
        <<interface>>
        RecvPacket() Packet
        SendPacket(Packet)
    }

    class PacketType {
        <<enumeration>>
        Unknow
        Connect
        Disconnect
    }

    class Packet {
        []byte data
        ToBinary() []byte
        FromBinary([]byte)
    }
}

Client ..> Packet
Packet --> PacketType
IoReadWriter <|.. Packet

namespace mod {

    class ModExecutor {
        <<interface>>
        Cmds() []string
        Exec(cmd, args)
    }

    class ModResponder {
        <<interface>>
        Respond(Client, Packet)
    }



    class Mod {
        <<interface>>
        ID() int
        Name() string
        SetClient(Client)
    }

    class ModDispatcher {
        <<interface>>
        Register(Mod)
        ByID(int) Mod
        ByCmd(string) Mod
        ByPacket(PacketType) Mod
    }

    class Shell
    class ScreenCapture
}

ModResponder ..> Client
ModResponder ..> Packet
ModExecutor <|-- Mod
ModResponder <|-- Mod
Mod --> Client
ModDispatcher o-- Mod
ModDispatcher ..> PacketType
Mod <|.. ScreenCapture
Mod <|.. Shell

class RAT {
    <<interface>>
    Register(Mod)
    Startup(port)
    Exec(cmd, args)
}

RAT --> ModDispatcher
RAT --> Logger
Loading

Bugs

The known bugs are marked by BUG in the comments.

License

Distributed under the MIT License. See LICENSE for more information.

About

💻 A Windows console remote administration tool written in Go & Intel x86 Assembly. It supports remote shell and screenshot.

Topics

Resources

License

Stars

Watchers

Forks