Upload

Tool

Updog

updog --ssl --port 9090 --password "exegol4thewin" --directory /opt/resources

Living Off Trusted Sites

Wget and cURL

Upload a repo

git clone on attacker host

victim

Create a Web Server on attacker machine

Updog

Windows - HFS HTTP File Server

Powershell_HttpServer

Python 3

Python 2.7

PHP

Ruby

Upload file

Fileless Upload

  1. with cURL

  1. with wget

Bash

SCP

SSH on attacker host

SSH on remote host

Base64

Linux - Transfer from attack host to victim

  1. Example 1

  1. Example 2

Windows - Transfer from attack host to victim

Powershell

DownloadFile method

DownloadString - Fileless Method

Execution in memory

Cradles

Invoke-WebRequest

alias iwr, curl or wget

Changing User Agent - Avoid Detection

Request with Chrome User Agent

Invoke-RestMethod

WinHttpRequest

Msxml2

SMB

From Linux to Windows

Unauthenticated guest access blocked

SMB server with credz

Mount SMB server with credz

Metasploit - Upload

Metasploitchevron-right

SMBclient - put

SMB (445, 139) / RPCchevron-right

Source:

SMBmap - upload

SMB (445, 139) / RPCchevron-right

FTP

From Linux to Windows

or

Python

PHP

Ruby

Perl

Javascript

Windows

Create wget.js with this content

VBScript

Create wget.vbs with this content

Netcat (nc)

nc.exe:

Simple example

  1. Victim

  1. Attacker

Inbound connections blocked

  1. Attack host

  1. Victim

Ncat (ncat)

Simple example

  1. Victim

  1. Attacker

Inbound connections blocked

  1. Attack host

  1. Victim

Bash

  1. Attack host

or

  1. Victim

WinRM

Powershell

Evil-WinRM

RDP

rdesktop

xfreerdp

Remmina

Windows to windows:

LOLBAS

Bitsadmin

Certutil

GfxDownloadWrapper.exe

GTFOBins

OpenSSL

  1. Attack host

  1. Victim

Metasploit

Metasploitchevron-right

Avoid AV Detection

NetLoader and Assembly Loader - See Payload Delivery in Static Analysis

Static Analysischevron-right

Resources

Last updated