渗透速记手册
Contents
内网渗透
信息收集
- 查看网络配置信息
- ipconfig /all
- systeminfo
- 查看本机服务信息
- wmic service list brief
- 查看进程列表
- tasklist
- wmic process list brief
- 查看启动程序信息
- wmic startup get command, caption
- 查看计划任务
- schtasks /query /fo LIST /v
- 查看用户列表
- net user
- 查看本地管理员(通常包含域用户)信息
- net localgroup administrators
- 查看在线用户
- query user || qwinsta
- 查看本地计算机连接的会话
- net session
- 查询端口
- netstat -ano
- 查看本机共享列表
- net share
- wmic share get name, path, status
- 查询路由表及所有可用接口的ARP缓存表
- route print
- arp -a
- 关闭防火墙
- netsh firewall set opmode disable (before Windows Server 2003)
- netsh advfirewall set allprofiles state off (after Windows Server 2003)
- 查看防火墙配置
- netsh firewall show config
- 查看权限
- whoami (本地普通用户不能查询域信息,本地管理员用户和域内用户可以查询域信息)
- 获取域SID
- whoami /all
- 查询指定用户的详细信息
- net user xxx /domain
- 查看当前登录域及登录用户信息
- net config workstation
- 判断主域
- net time /domain
- 查询域
- net view /domain
- 查询域内所有计算机
- net view /domain:<domain>
- 查询域内所有用户组列表
- net group /domain
- Domain Admins: 域管理员
- Domain Computers: 域内机器
- Domain Controllers: 域控制器
- Domain Guest: 域访客,权限低
- Domain Users: 域用户
- Enterprise Admins: 企业管理员用户
- net group /domain
- 查询域成员计算机列表
- net group “domain computers” /domain
- 查询域密码信息
- net accounts /domain
- 查询域信任信息
- nltest /domain_trusts
- 查看域控的机器名
- nltest /DCLIST:<domain>
- 查看当前时间
- net time /domain
- 查看域控制器组
- net group “domain controllers” /domain
- 查看域管理员用户
- net group “domain admins” /domain
- 查询本地管理员组用户
- net localgroup administrators
- 网络扫描
- nmap -sP <ip> # ping 扫描
- nmap -PN -sV –top-ports 50 –open <ip> # 快速扫描
- nmap -PN -sC -sV <ip> # 经典扫描
- nmap -PN -sC -sV -p- <ip> # 全扫描
- nmap -sU -sV -sC <ip> # UDP扫描
敏感文件
Windows
- C:\boot.ini // 查看系统版本
- C:\Windows\System32\inetstv\MetaBase.xml // IIS配置文件
- C:\Windows\repair\sam // 存储系统初次安装的密码
- C:\Program Files\mysql\my.ini // Mysql配置
- C:\Program Files\mysql\data\mysql\user.MYD // Mysql root
- C:\Windows\php.ini // php配置信息
- C:\Windows\my.ini // Mysql配置信息
- C:\Windows\win.ini // windows 系统的一个基本系统配置文件
Linux
- /proc/1/cgroup // 判断是否在docker容器内
- cat /etc/issue // 系统版本
- cat /proc/version // 内核版本
- cat /etc/passwd | /etc/shadow // 账户密码
- cat /etc/profile // 环境变量
- ls -alh /sbin // 系统目录
- ls -alh /usr/bin // 安装命令
- cat /etc/crontab // 开机自启
- history // 历史记录
- ~/.bash_history
- ~/.nano_history
- ~/.atftp_history
- ~/.mysql_history
- ~/.php_history
- network
- cat /etc/resolv.conf
- cat /etc/networks
- cat /etc/sysconfig/network
- cat /etc/host.conf
- cat /etc/hosts
- cat /etc/dhcp.conf
- service配置
- cat /etc/apache2/apache2.conf
- cat /etc/httpd/conf/httpd.conf
- cat /etc/httpd/conf/httpd2.conf
- cat /var/apache2/config/inc
- cat /usr/local/etc/nginx/nginx.conf
- cat /usr/local/nginx/conf/nginx.conf
- cat /etc/my.cnf
- cat /cat/mysql/my.cnf
- cat /var/lib/mysql/mysql/user.MYD
- cat /etc/mongod.conf
- cat /usr/local/redis/redis.conf
- cat /etc/redis/redis.conf
- cat /etc/proftpd.conf // ftp
- mail
- cat /var/mail/root
- cat /var/spool/mail/root
- cat ~/.fetchmailrc
- cat /etc/procmailrc
- cat ~/.procmailrc
- cat /etc/exim/exim.cf
- cat /etc/postfix/main.cf
- cat /usr/share/sendmail/cf/cf/linux.smtp.mc
- cat /etc/mail/sendmail.cf
- ssh
- cat ~/.ssh/authorized_keys
- cat ~/.ssh/identity.pub
- cat ~/.ssh/identity
- cat ~/.ssh/id_rsa.pub
- cat ~/.ssh/id_rsa
- cat ~/.ssh/id_dsa.pub
- cat ~/.ssh/id_dsa
- cat /etc/ssh/ssh_config
- cat /etc/ssh/sshd_config
- cat /etc/ssh/ssh_host_dsa_key.pub
- cat /etc/ssh/ssh_host_dsa_key
- cat /etc/ssh/ssh_host_rsa_key.pub
- cat /etc/ssh/ssh_host_rsa_key
- cat /etc/ssh/ssh_host_key.pub
- cat /etc/ssh/ssh_host_key
- log
- ls /var/log
- cat /etc/httpd/logs/access_log
- cat /etc/httpd/logs/access.log
- cat /etc/httpd/logs/error_log
- cat /etc/httpd/logs/error.log
- cat /var/log/apache2/access_log
- cat /var/log/apache2/access.log
- cat /var/log/apache2/error_log
- cat /var/log/apache2/error.log
- cat /var/log/apachr/access_log
- cat /var/log/apache/access.log
- cat /var/log/auth.log
- cat /var/log/chttp.log
- cat /var/log/cups/error_log
- cat /var/log/dkpg.log
- cat /var/log/faillog
- cat /var/log/lighthttpd/access.log
- cat /var/log/lighthttpd/error.log
- cat /var/log/lighthttpd.access.log
- cat /var/log/lighthttpd.error.log
- cat /var/log/messages
- cat /var/log/secure
- cat /var/log/syslog
- cat /var/log/wtmp
- cat /var/log/xferlog
- cat /var/log/yum.log
- cat /var/run/utmp
- cat /var/webmin/miniserv.log
- cat /var/www/logs/access_log
- cat /var/www/logs/access.log
- proc fuzz
- /proc/self/fd/32
- /proc/self/fd/33
- /proc/self/fd/34
- /proc/self/fd/35
- /proc/sched_debug
- /proc/mounts
- /proc/net/arp
- /proc/net/route
- /proc/net/tcp
- /proc/net/udp
- /proc/net/fib_trie
- /proc/version