Giter Site home page Giter Site logo

lu4p / torat Goto Github PK

View Code? Open in Web Editor NEW
960.0 40.0 201.0 429 KB

ToRat is a Remote Administation tool written in Go using Tor as a transport mechanism and RPC for communication

Home Page: https://lu4p.github.io/ToRat

License: The Unlicense

Go 97.46% Dockerfile 2.34% Shell 0.19%
remote-admin-tool tor reverse-shell golang persistence keylogger reverse-shells transport shell-reverse uac-bypass

torat's Introduction

License CircleCI Go Report Card Docker Cloud Build Status

A Cross Platform Remote Administration tool written in Go using Tor as its transport mechanism currently supporting Windows, Linux, MacOS clients.

DISCLAIMER

USE FOR EDUCATIONAL PURPOSES ONLY

Wiki

How to use ToRat Docker Image

Preview

Client Commands

Command Info
cd change the working directory of the client
ls list the content of the working directory of the client
shred delete files/ directories unrecoverable
screen take a Screenshot of the client
cat view Textfiles from the client including .docx, .rtf, .pdf, .odt
alias give the client a custom alias
down download a file from the client
up upload a file to the client
speedtest speedtest a client's internet connection
hardware collects a variety of hardware specs from the client
netscan scans a clients entire network for online devices and open ports
gomap scan a local ip on a clients network for open ports and services
escape escape a command and run it in a native shell on the client
reconnect tell the client to reconnect
help lists possible commands with usage info
exit background current session and return to main shell

Server Commands

Command Info
select select client to interact with
list list all connected clients
alias select client to give an alias
cd change the working directory of the server
help lists possible commands with usage info
exit exit the server

Current Features

Architecture

  • RPC (Remote procedure Call) based communication for easy addition of new functionality
  • Automatic upx leads to client binaries of ~6MB with embedded Tor
  • sqlite via gorm for storing information about the clients
  • client is obfuscated via garble

Server Shell

  • Cross Platform reverse shell (Windows, Linux, Mac OS)

  • Supports multiple connections

  • Welcome Banner

  • Colored Output

  • Tab-Completion of:

    • Commands
    • Files/ Directories in the working directory of the server
  • Unique persistent ID for every client

    • give a client an Alias
    • all Downloads from client get saved to ./$ID/$filename

Persistence

  • Windows:

    • Multiple User Account Control Bypasses (Privilege escalation)
    • Multiple Persistence methods (User, Admin)
  • Linux:

    • Multiple Persistence methods (User, Admin)

Tor

  • Fully embedded Tor within go

  • the ToRAT_client communicates over TLS encrypted RPC proxied through Tor with the ToRat_server (hidden service)

    • anonymity of client and server
    • end-to-end encryption
  • optional transport without Tor e.g. Use Tor2Web, a DNS Hostname or public/ local IP

    • smaller binary ~3MB upx'ed
    • anonymity of client and server

Upcoming Features

Contribution

All contributions are welcome you don't need to be an expert in Go to contribute.

You may want to join the #torat channel over at the Gophers Slack

Credits

torat's People

Contributors

dependabot[bot] avatar justintimperio avatar lu4p avatar renovate-bot avatar renovate[bot] avatar shadowhunters2020 avatar superwofy 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torat's Issues

Empty `cd` command results in server crash

[Server] /ToRat/cmd/server$ ls
ToRat.db
banner.txt
bots
data-dir-716396921
main.go

[Server] /ToRat/cmd/server$ cd bots
/ToRat/cmd/server/bots$ ls
vBHv3Vc5awx39ivu

/ToRat/cmd/server/bots/vBHv3Vc5awx39ivu$ ls -f
.
..

/ToRat/cmd/server/bots/vBHv3Vc5awx39ivu$ cd
2021/02/10 04:17:25 Could not change directory: chdir : no such file or directory
conductor@debian:~/ToRat$ 

Clients not showing up

Hey guys.
I tried to set ToRat up, with the setup guide provided.
Wenn I try to connect a client by installing the Linux and windows Clients, they won't show up.
I checked with my VPS hoster, and they dont prohibit Tor traffic so they aren't the Problem. Any Idea on what the problem might be?
Kind Regards
AlphaO4

down and up

I can't figure out where files are saved from the client, and how to select files to upload to the client using docker

The client shuts down when the server is disconnected

The client shuts down when the server is disconnected and must be restarted manually. This is very inconvenient, because the server may be disconnected due to an error or lose connection. The client must wait for the server to appear on the network and reconnect.

Invalid Hostname Unsufficent AesKey length

I just grab the latest repo code. Build success and run windows client but these message popup in server console:

EncHostname []
Invalid Hostname Unsufficent AesKey length

Linux client work fine.

Regenerate hostname when the server rejects it.

This seems to trace to a client-side error creating the identity keys

Client

conductor@debian:~$ ./client_linux 
2021/03/08 20:31:45 [CheckExisting] I am NOT the existing install!
2021/03/08 20:31:45 [CheckElevate] Running as USER
2021/03/08 20:31:45 [Elevate] Installing payload into: /home/conductor/.cache/libssh/libssh
2021/03/08 20:31:45 [Elevate] [+] Successfully copied payload into target path
2021/03/08 20:31:45 Path for bypass: ( /home/conductor/.cache/libssh/libssh )
2021/03/08 20:31:45 [SetupDaemon] Passing off to Daemon installer...
2021/03/08 20:31:45 [CheckElevate] Running as USER
2021/03/08 20:31:45 [initServer] Initialized server cert
2021/03/08 20:31:45 [NetClient] Starting Tor connection...
Mar 08 20:31:49.000 [warn] Tried connecting to router at 193.234.15.62:443, but RSA + ed25519 identity keys were not as expected: wanted 5CF8AFA5E4B0BB88942A44A3F3AAE08C3BDFD60B + no ed25519 key but got CD0F9AA1A5064430B1DE8E645CBA7A502B27ED5F + +Z4gh7IJ1d3FFPNAdujZsHwl0KWIf0D/MZmApa/6nG4.
2021/03/08 20:31:54 [NetClient] Connecting to: sgixes3r3j2oufgi427grry5rwr3xn2ix7ngpen5rkn3vgzuqvgrqfad.onion:1337
2021/03/08 20:33:03 [NetClient] [+] Connection to server successful

Server

[Server] /ToRat/cmd/server$ Mar 09 01:31:11.000 [warn] You are running Tor as root. You don't need to, and you probably shouldn't.
2021/03/09 01:31:25 Onion service running: sgixes3r3j2oufgi427grry5rwr3xn2ix7ngpen5rkn3vgzuqvgrqfad.onion
2021/03/09 01:33:04 [!] Rsa: crypto/rsa: decryption error
2021/03/09 01:33:04 Invalid Hostname: crypto/rsa: decryption error

[Minor Issue] Alias does not update server name in `list` command

I have yet to pinpoint why this happens but the list command does not seem to be using the value defined by name in the SQLite database.

Select client to give an alias
 ❯ 0    vBHv3Vc5awx39ivu        vBHv3Vc5awx39ivu
Type an alias for selected client
Test_Name

2021/02/10 04:04:48 /ToRat/torat_server/shell.go:70 WHERE conditions required
[0.426ms] [rows:0] UPDATE `clients` SET `hostname`="vBHv3Vc5awx39ivu",`name`="Test_Name",`path`="bots/vBHv3Vc5awx39ivu",`ip`="",`location`="",`last_conn`=0,`active`=false,`mac_addr`="",`os`="",`cpu`="",`gpu`="",`ram`="",`drives`=""
[Server] /ToRat/cmd/server$ list
Clients:
0       vBHv3Vc5awx39ivu        vBHv3Vc5awx39ivu

Make docker image smaller

Docker image is currently relatively big ~1.6gb, xgo has some dependencies which can probably be removed, caches of apt-get etc can be cleared.

[Feature Completion] Client Hardware Detection

I noticed that model.go defines a bunch of client side information that is never collected. I have actually built something like this before using ghw which is an awesome library. It can run in both user and root space but for your predefined values, we should only need user perms. I think I should be able to add this in a day or two but I'll let you know as I go.

I fork this repo to test,have error after client connect

error

git clone https://github.com/b3r1ch/ToRat.git
docker build . -t torat
docker run -it -v "$(pwd)"/dist:/dist_ext torat

After I execute docker run -it -v "$(pwd)"/dist:/dist_ext torat, the client execution file is generated to the ./dist
I upload client_linux to my other server and exec this client file
But server print some error:
[Server] /ToRat/cmd/server$ 2020/12/11 13:49:11 [!] Rsa: crypto/rsa: decryption error
2020/12/11 13:49:11 Invalid Hostname: crypto/rsa: decryption error

[Improvement] Hide/Obfuscate Tor Client Files

Currently, when a client binary is deployed, Tor uses the $pwd to create a tor data-dir. This is sub-optimal for a bunch of reason, but chiefly because its suspect. I have already prepped a fix for this but figured I'd open an issue to ref in the PR.

Client `up` command panic crashes on missing file

[vBHv3Vc5awx39ivu] /home/justin/Repos/Shell/nixinfo$ up ls
[Server] [!] Upload failed could not read local file!
[Server] [!] open ls: no such file or directory
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x895cce]

goroutine 1 [running]:
github.com/lu4p/ToRat/torat_server.(*activeClient).Upload(0xc00032e400, 0xc00049a1a0)
        /ToRat/torat_server/client_ishell.go:182 +0x14e
github.com/abiosoft/ishell.(*Shell).handleCommand(0xc000424000, 0xc0004be1e0, 0x2, 0x2, 0xc0000f56f8, 0x20, 0xc000000180)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:250 +0x322
github.com/abiosoft/ishell.handleInput(0xc000424000, 0xc0004be1e0, 0x2, 0x2, 0xc000247801, 0xc000270960)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:204 +0x4d
github.com/abiosoft/ishell.(*Shell).run(0xc000424000)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:183 +0x22e
github.com/abiosoft/ishell.(*Shell).Run(0xc000424000)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:99 +0x39
github.com/lu4p/ToRat/torat_server.activeClient.shellClient(0xc0003125d0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000245740, 0xc0003125d0, 0x10, ...)
        /ToRat/torat_server/client_ishell.go:99 +0xd3d
github.com/lu4p/ToRat/torat_server.Shell.func1(0xc00031ac30)
        /ToRat/torat_server/server_ishell.go:38 +0x105
github.com/abiosoft/ishell.(*Shell).handleCommand(0xc0001d2d20, 0xc000314c80, 0x1, 0x1, 0xc0000f5d60, 0x20, 0xc000000180)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:250 +0x322
github.com/abiosoft/ishell.handleInput(0xc0001d2d20, 0xc000314c80, 0x1, 0x1, 0xc000314b01, 0xc000310360)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:204 +0x4d
github.com/abiosoft/ishell.(*Shell).run(0xc0001d2d20)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:183 +0x22e
github.com/abiosoft/ishell.(*Shell).Run(0xc0001d2d20)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:99 +0x39
github.com/lu4p/ToRat/torat_server.Shell()
        /ToRat/torat_server/server_ishell.go:108 +0x5bd
main.main()
        /ToRat/cmd/server/main.go:10 +0x3a

docker build error

Step 12/16 : RUN cd /ToRat/cmd/client && garble build -tags "tor" -o /dist/client/client_linux && upx /dist/client/client_linux
---> Running in cf79677dc9a0

github.com/lu4p/ToRat/torat_client

typecheck error: ../../torat_client/netclient.go:12:2: could not import github.com/cretz/bine/process/embedded (path not found in listed packages: github.com/cretz/bine/process/embedded)
exit status 2

Server:vultr.com

Invalid Hostname: crypto/rsa: decryption error

Server-Side

❯ sudo docker run -it -v "$(pwd)"/dist:/dist_ext torat

client  server

Welcome to


TTTTTTTTTTTTTTTTTTTTTTT              RRRRRRRRRRRRRRRRR                             tttt
T:::::::::::::::::::::T              R::::::::::::::::R                         ttt:::t
T:::::::::::::::::::::T              R::::::RRRRRR:::::R                        t:::::t
T:::::TT:::::::TT:::::T              RR:::::R     R:::::R                       t:::::t
TTTTTT  T:::::T  TTTTTTooooooooooo     R::::R     R:::::R  aaaaaaaaaaaaa  ttttttt:::::ttttttt
        T:::::T      oo:::::::::::oo   R::::R     R:::::R  a::::::::::::a t:::::::::::::::::t
        T:::::T     o:::::::::::::::o  R::::RRRRRR:::::R   aaaaaaaaa:::::at:::::::::::::::::t
        T:::::T     o:::::ooooo:::::o  R:::::::::::::RR             a::::atttttt:::::::tttttt
        T:::::T     o::::o     o::::o  R::::RRRRRR:::::R     aaaaaaa:::::a      t:::::t
        T:::::T     o::::o     o::::o  R::::R     R:::::R  aa::::::::::::a      t:::::t
        T:::::T     o::::o     o::::o  R::::R     R:::::R a::::aaaa::::::a      t:::::t
        T:::::T     o::::o     o::::o  R::::R     R:::::Ra::::a    a:::::a      t:::::t    tttttt
      TT:::::::TT   o:::::ooooo:::::oRR:::::R     R:::::Ra::::a    a:::::a      t::::::tttt:::::t
      T:::::::::T   o:::::::::::::::oR::::::R     R:::::Ra:::::aaaa::::::a      tt::::::::::::::t
      T:::::::::T    oo:::::::::::oo R::::::R     R:::::R a::::::::::aa:::a       tt:::::::::::tt
      TTTTTTTTTTT      ooooooooooo   RRRRRRRR     RRRRRRR  aaaaaaaaaa  aaaa         ttttttttttt

Created by https://github.com/lu4p/


[Server] /ToRat/cmd/server$ Feb 11 18:03:07.000 [warn] You are running Tor as root. You don't need to, and you probably shouldn't.
2021/02/11 18:03:20 Onion service running: 5tm3eowogctel7d2qnhgdh3es267i7krmb4xtceqtooq6xxgpcfrzwyd.onion
2021/02/11 18:04:01 [!] Rsa: crypto/rsa: decryption error
2021/02/11 18:04:01 Invalid Hostname: crypto/rsa: decryption error

Client-Side

❯ ./dist/client/client_linux
2021/02/11 13:03:13 CheckSetup
2021/02/11 13:03:13 Elevate
2021/02/11 13:03:13 copyExecuteable
2021/02/11 13:03:13 Path for bypass: ( /home/justin/.cache/libssh/libssh )
2021/02/11 13:03:13 Setup
2021/02/11 13:03:13 NetClient
2021/02/11 13:03:13 Domain: 5tm3eowogctel7d2qnhgdh3es267i7krmb4xtceqtooq6xxgpcfrzwyd.onion
2021/02/11 13:03:54 connecting to 5tm3eowogctel7d2qnhgdh3es267i7krmb4xtceqtooq6xxgpcfrzwyd.onion:1337
2021/02/11 13:03:59 connect

Not working as expected

After building a docker image I start server and it starts on port 8000 with http server tor service started as well but it stops there.
When I press any key it lets me insert commands but clients cannot connect from windows or linux environment.

Is there any way to debug or something?

Missing file during upload results in server crash/panic

[vBHv3Vc5awx39ivu] /$ cd /etc/
[vBHv3Vc5awx39ivu] /etc$ up fstab
[!] Upload failed could not Read file
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x896b3d]

goroutine 1 [running]:
github.com/JustinTimperio/ToRat/torat_server.(*activeClient).Upload(0xc0000de500, 0xc00031e000)
        /ToRat/torat_server/shell.go:346 +0x13d
github.com/abiosoft/ishell.(*Shell).handleCommand(0xc000370000, 0xc00010c980, 0x2, 0x2, 0xc0002cd728, 0x20, 0xc000000180)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:250 +0x322
github.com/abiosoft/ishell.handleInput(0xc000370000, 0xc00010c980, 0x2, 0x2, 0xc00022c601, 0xc000028660)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:204 +0x4d
github.com/abiosoft/ishell.(*Shell).run(0xc000370000)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:183 +0x22e
github.com/abiosoft/ishell.(*Shell).Run(0xc000370000)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:99 +0x39
github.com/JustinTimperio/ToRat/torat_server.activeClient.shellClient(0xc00010eef0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00011aa20, 0xc00010eef0, 0x10, ...)
        /ToRat/torat_server/shell.go:201 +0xaf4
github.com/JustinTimperio/ToRat/torat_server.Shell.func1(0xc00031e4e0)
        /ToRat/torat_server/shell.go:45 +0x105
github.com/abiosoft/ishell.(*Shell).handleCommand(0xc0001b8d20, 0xc0000fd320, 0x1, 0x1, 0xc000171d60, 0x20, 0xc000000180)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:250 +0x322
github.com/abiosoft/ishell.handleInput(0xc0001b8d20, 0xc0000fd320, 0x1, 0x1, 0xc000408801, 0xc00043c3c0)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:204 +0x4d
github.com/abiosoft/ishell.(*Shell).run(0xc0001b8d20)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:183 +0x22e
github.com/abiosoft/ishell.(*Shell).Run(0xc0001b8d20)
        /go/pkg/mod/github.com/abiosoft/[email protected]+incompatible/ishell.go:99 +0x39
github.com/JustinTimperio/ToRat/torat_server.Shell()
        /ToRat/torat_server/shell.go:113 +0x5bd
main.main()
        /ToRat/cmd/server/main.go:10 +0x3a

Inactive session

Hi! It's an awesome project and I really like it.

image

Can you add a survivability test, delete the inactive session, or turn it red, otherwise I don’t know which ones have expired sessions.

remote error: tls: bad certificate

Hello,

I have errors form clients:

Invalid hostname: remote error: tls: bad certificate
Invalid hostname: remote error: tls: bad certificate
Invalid hostname: remote error: tls: bad certificate

OS: Parrot OS 4.11.1

Building docker image gives error

When I try to build the ToRat image on a Debian VM I get the following error message at the end:

Step 17/22 : RUN cd ./cmd/client && garble -literals -seed=random build -ldflags="-extldflags=-static" -tags "osusergo,netgo,tor" -o /dist/client/client_linux && upx /dist/client/client_linux
 ---> Running in be6cf314555d
Go version "go1.16" is too old; please upgrade to Go 1.17.x
The command '/bin/sh -c cd ./cmd/client && garble -literals -seed=random build -ldflags="-extldflags=-static" -tags "osusergo,netgo,tor" -o /dist/client/client_linux && upx /dist/client/client_linux' returned a non-zero code: 1

I can't run the image either (because of that previous error) and I get this when trying to run:

root@debian:~/ToRat# sudo docker run -it -v "$(pwd)"/dist:/dist_ext torat
Unable to find image 'torat:latest' locally
docker: Error response from daemon: pull access denied for torat, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

Restarted(or crashed) server results in all clients crashing

Again not totally sure what the issue is here. I see errors on both the server and client side.

Server Side

conductor@debian:~/ToRat$ sudo docker run -it -v "$(pwd)"/dist:/dist_ext torat
[sudo] password for conductor: 
client  server

Welcome to


TTTTTTTTTTTTTTTTTTTTTTT              RRRRRRRRRRRRRRRRR                             tttt
T:::::::::::::::::::::T              R::::::::::::::::R                         ttt:::t
T:::::::::::::::::::::T              R::::::RRRRRR:::::R                        t:::::t
T:::::TT:::::::TT:::::T              RR:::::R     R:::::R                       t:::::t
TTTTTT  T:::::T  TTTTTTooooooooooo     R::::R     R:::::R  aaaaaaaaaaaaa  ttttttt:::::ttttttt
        T:::::T      oo:::::::::::oo   R::::R     R:::::R  a::::::::::::a t:::::::::::::::::t
        T:::::T     o:::::::::::::::o  R::::RRRRRR:::::R   aaaaaaaaa:::::at:::::::::::::::::t
        T:::::T     o:::::ooooo:::::o  R:::::::::::::RR             a::::atttttt:::::::tttttt
        T:::::T     o::::o     o::::o  R::::RRRRRR:::::R     aaaaaaa:::::a      t:::::t
        T:::::T     o::::o     o::::o  R::::R     R:::::R  aa::::::::::::a      t:::::t
        T:::::T     o::::o     o::::o  R::::R     R:::::R a::::aaaa::::::a      t:::::t
        T:::::T     o::::o     o::::o  R::::R     R:::::Ra::::a    a:::::a      t:::::t    tttttt
      TT:::::::TT   o:::::ooooo:::::oRR:::::R     R:::::Ra::::a    a:::::a      t::::::tttt:::::t
      T:::::::::T   o:::::::::::::::oR::::::R     R:::::Ra:::::aaaa::::::a      tt::::::::::::::t
      T:::::::::T    oo:::::::::::oo R::::::R     R:::::R a::::::::::aa:::a       tt:::::::::::tt
      TTTTTTTTTTT      ooooooooooo   RRRRRRRR     RRRRRRR  aaaaaaaaaa  aaaa         ttttttttttt

Created by https://github.com/lu4p/


[Server] /ToRat/cmd/server$ Feb 10 04:20:22.000 [warn] You are running Tor as root. You don't need to, and you probably shouldn't.
2021/02/10 04:20:31 Onion service running: ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion
2021/02/10 04:20:39 Invalid Hostname: EOF

Client Side

conductor@debian:~$ ./client_linux
2021/02/09 23:03:26 CheckSetup
2021/02/09 23:03:26 Elevate
2021/02/09 23:03:26 copyExecuteable
2021/02/09 23:03:26 Path for bypass: ( /home/conductor/.cache/libssh/libssh )
2021/02/09 23:03:26 Setup
2021/02/09 23:03:26 NetClient
2021/02/09 23:03:26 Domain: ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion
2021/02/09 23:03:34 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:03:38 connect
2021/02/09 23:17:25 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:17:29 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:17:39 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:17:40 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:17:50 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:17:50 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:18:00 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:18:01 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:18:11 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:18:12 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:18:22 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:18:22 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:18:32 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:18:33 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:18:43 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:18:44 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:18:54 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:18:54 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:19:04 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:19:06 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:19:16 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:19:17 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:19:27 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:20:13 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:20:23 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:20:24 Could not connect: socks connect tcp 127.0.0.1:44939->ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337: unknown error host unreachable
2021/02/09 23:20:34 connecting to ub7qk3lfdiq47ekjxgnudmy5whbrwfcv4ul526kmlgjpa5qfttgrc3ad.onion:1337
2021/02/09 23:20:38 connect
2021/02/09 23:20:38 rpc: service already defined: API
conductor@debian:~$ 

The path /dist is not shared from OS X and is not known to Docker.

I know the mac client does not work, but want to work on it.

The problem: The HOST <--> DOCKER directory mapping is not working automatically
I cant manually fix the issue below, but wondering if there is a way to make it work automatically for everyone.

Error log:

make this-server-run
cd /Users/apple/workspace/go/src/github.com/lu4p/ToRat && sudo docker run -it -v ""/dist:/dist_ext torat
Password:
docker: Error response from daemon: Mounts denied: 
The path /dist is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
ERRO[0000] error waiting for container: context canceled 
make: *** [this-server-run] Error 125

Repo Make file:


LIB_REPO=				github.com/lu4p
LIB_REPO_FSPATH=		$(GOPATH)/src/$(LIB_REPO)

## RAT

RAT_LIB_NAME=ToRat
RAT_LIB_FSPATH=$(LIB_REPO_FSPATH)/$(RAT_LIB_NAME)


this-server-print:
	@echo RAT_LIB_NAME: 		$(RAT_LIB_NAME)
	@echo RAT_LIB_FSPATH: 		$(RAT_LIB_FSPATH)

this-server-build:
	cd $(RAT_LIB_FSPATH) && sudo docker build . -t torat
this-server-run:
	# this runs the Server & 
	# spits out to the host the Server binaries to ./dist/dist/server, wth certs etc. All ready to be deplyoed somewhere.
	# spits out to the host the client binaries to ./dist/dist/client, so you can use them to connect. Pretty nice
	cd $(RAT_LIB_FSPATH) && sudo docker run -it -v "$(pwd)"/dist:/dist_ext torat
this-client-run:
	# linux
	$(RAT_LIB_FSPATH)/dist/dist/client/client_linux
	# windows
	$(RAT_LIB_FSPATH)/dist/dist/client/client_windows.exe 
	# mac
	## Does not have one for mac yet :)


Changing directories in Server ishell results in changed download path for `/bots/<HOSTNAME>

This is kind of a hard one to explain. It has to do with the way certain vars are used in the client ishell down function. When the download path is defined its uses the servers ishell.cwd() + '/bots/<USERNAME>'. This means that if you have run cd on the server, (changing the ishell.cwd()) the download path changes. This just needs to be statically defined so /bots has an absolute path.

Fix gobfuscate

https://github.com/unixpickle/gobfuscate

Gobfuscate is currently very slow obfuscation takes about an hour.

  • make some obfuscation concurrent
  • add the passing of build tags
  • obfuscation can't be cached need to obfuscate from scratch everytime
  • add the ability to include additional directories otherwise not found by gobfuscate
  • has some issues with _

[Critical Issue] Reconnecting hosts are duplicated in the SQL DB and ActiveConn

2021/02/11 20:39:57 /ToRat/torat_server/server.go:96 WHERE conditions required
[0.233ms] [rows:0] UPDATE `clients` SET `hostname`="vBHv3Vc5awx39ivu",`name`="vBHv3Vc5awx39ivu",`path`="bots/vBHv3Vc5awx39ivu",`ip`="",`location`="",`last_conn`=0,`active`=false,`mac_addr`="",`os`="",`cpu`="",`gpu`="",`ram`="",`drives`=""
[+] New Client vBHv3Vc5awx39ivu connected!

2021/02/11 20:53:41 /ToRat/torat_server/server.go:96 WHERE conditions required
[0.147ms] [rows:0] UPDATE `clients` SET `hostname`="vBHv3Vc5awx39ivu",`name`="vBHv3Vc5awx39ivu",`path`="bots/vBHv3Vc5awx39ivu",`ip`="",`location`="",`last_conn`=0,`active`=false,`mac_addr`="",`os`="",`cpu`="",`gpu`="",`ram`="",`drives`=""
[+] New Client vBHv3Vc5awx39ivu connected!

[Server] /ToRat/cmd/server$ list
Clients:
0       vBHv3Vc5awx39ivu        vBHv3Vc5awx39ivu
1       vBHv3Vc5awx39ivu        vBHv3Vc5awx39ivu
[Server] /ToRat/cmd/server$ 

make the linux client not show output

####@#####:~$ ./client_linux
2022/09/23 18:54:44 [CheckExisting] I am NOT the existing install!
2022/09/23 18:54:44 [CheckElevate] Running as USER
2022/09/23 18:54:44 [Elevate] Installing payload into: /home/###/.cache/libssh/libssh
2022/09/23 18:54:44 [Elevate] [+] Successfully copied payload into target path
2022/09/23 18:54:44 Path for bypass: ( /home/######/.cache/libssh/libssh )
2022/09/23 18:54:44 [SetupDaemon] Passing off to Daemon installer...
2022/09/23 18:54:44 [initServer] Initialized server cert
2022/09/23 18:54:44 [NetClient] Starting connection
2022/09/23 18:54:44 [CheckElevate] Running as USER
2022/09/23 18:54:44 [NetClient] Starting Tor connection...
2022/09/23 18:54:57 [NetClient] Connecting to: censored
2022/09/23 18:55:10 [NetClient] [+] Connection to server successful

I was wondering if there was a way to not display this.

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.