/etc/resolv.conf 看DNS配置,看可不可以劫持,例如直接该文件呀 /etc/passwd 存放账号信息 /etc/shadow 存放密码信息 whoami and who –a 查看用户信息 ifconfig -a, iptables -L -n, ifconfig –a, netstat –r 查看网络参数信息 uname –a 查看系统版本信息,看有木有已知的漏洞 ps aux 查看当前进程信息 dpkg -l| head 查看软件包安装信息
Windows 基本信息收集
1 2 3 4 5 6 7 8 9 10 11 12
ipconfig /all 基本的网络配置 ipconfig /displaydns 显示缓存的dns解析记录 netstat -bnao 查看各个软件的连接信息 netstat –r 显示网络接口,路由表等 net view , net view /domain 查看网络共享的 net user /domain, net user %username% /domain 查看与共享的 net accounts 显示账户安全策略的 net share 显示文件共享的 net localgroup administrators username /add 将一个账户加到管理员组 net group "Domain Controllers" /domain 查看域控制的 net share name$=C:\ /unlimited 将C盘无限制的共享 net user username /active:yes /domain 激活某个用户
WMIC(WINDOWS MANAGEMENT INSTRUMENTATION)
1 2 3 4 5 6 7 8 9 10
wmic computersystem get username 查看当前登录账号名称的 wmic netlogin get name,lastlogon 查看用户登录记录的 wmic process get caption, executablepath,commandline 看到当前进程及是由那条命令(软件及文件位置)生成的进程 wmic process where name=“calc.exe" call terminate 结束这个叫calc.exe的进程 wmic os get name,servicepackmajorversion 取得系统版本的,补丁 wmic product get name,version 查看当前安装的软件 wmic product where name=“name” call uninstall /nointeractive 在后台静默的删除“”里面名字的软件 wmic share get /ALL 看共享的 wmic /node:"machinename" path Win32_TerminalServiceSetting where AllowTSConnections="0" call SetAllowTSConnections "1" 用来开启远程桌面的,机器名就是目标机器的名称,自己就可以改为localhost wmic nteventlog get path,filename, writeable 查看系统日志及存放位置的
收集敏感数据
1 2 3 4 5
系统信息 .ssh ;.gnupg 这个目录下有公私钥,用cat known_hosts查看,密钥可以登录系统 /tmp 临时目录权限高,里面容易残留敏感信息 SAM 数据库 ; 注册表文件 UserProfile\AppData\Local\Microsoft\Windows\Temporary Internet Files\ 这是windows的临时目录
Name Disclosure Date Rank Description ---- --------------- ---- ----------- auxiliary/admin/http/manageengine_pmp_privesc 2014-11-08 normal ManageEngine Password Manager SQLAdvancedALSearchResult.cc Pro SQL Injection auxiliary/admin/mssql/mssql_escalate_dbowner normal Microsoft SQL Server Escalate Db_Owner auxiliary/admin/mssql/mssql_escalate_dbowner_sqli normal Microsoft SQL Server SQLi Escalate Db_Owner auxiliary/admin/mssql/mssql_escalate_execute_as normal Microsoft SQL Server Escalate EXECUTE AS auxiliary/admin/mssql/mssql_escalate_execute_as_sqli normal Microsoft SQL Server SQLi Escalate Execute AS auxiliary/scanner/http/cisco_ssl_vpn_priv_esc 2014-04-09 normal Cisco ASA SSL VPN Privilege Escalation Vulnerability auxiliary/sqli/oracle/dbms_cdc_subscribe_activate_subscription 2005-04-18 normal Oracle DB SQL Injection via SYS.DBMS_CDC_SUBSCRIBE.ACTIVATE_SUBSCRIPTION auxiliary/sqli/oracle/dbms_export_extension 2006-04-26 normal Oracle DB SQL Injection via DBMS_EXPORT_EXTENSION auxiliary/sqli/oracle/dbms_metadata_get_granted_xml 2008-01-05 normal Oracle DB SQL Injection via SYS.DBMS_METADATA.GET_GRANTED_XML auxiliary/sqli/oracle/dbms_metadata_get_xml 2008-01-05 normal Oracle DB SQL Injection via SYS.DBMS_METADATA.GET_XML auxiliary/sqli/oracle/dbms_metadata_open 2008-01-05 normal Oracle DB SQL Injection via SYS.DBMS_METADATA.OPEN auxiliary/sqli/oracle/droptable_trigger 2009-01-13 normal Oracle DB SQL Injection in MDSYS.SDO_TOPO_DROP_FTBL Trigger auxiliary/sqli/oracle/lt_findricset_cursor 2007-10-17 normal Oracle DB SQL Injection via SYS.LT.FINDRICSET Evil Cursor Method exploit/linux/http/pandora_fms_exec 2014-01-29 excellent Pandora FMS Remote Code Execution exploit/linux/http/riverbed_netprofiler_netexpress_exec 2016-06-27 excellent Riverbed SteelCentral NetProfiler/NetExpress Remote Code Execution exploit/linux/local/bpf_priv_esc 2016-05-04 good Linux BPF Local Privilege Escalation exploit/linux/local/desktop_privilege_escalation 2014-08-07 excellent Desktop Linux Password Stealer and Privilege Escalation exploit/linux/local/sophos_wpa_clear_keys 2013-09-06 excellent Sophos Web Protection Appliance clear_keys.pl Local Privilege Escalation exploit/linux/local/zpanel_zsudo 2013-06-07 excellent ZPanel zsudo Local Privilege Escalation Exploit exploit/multi/http/moodle_cmd_exec 2013-10-30 good Moodle Remote Command Execution exploit/osx/local/nfs_mount_root 2014-04-11 normal Mac OS X NFS Mount Privilege Escalation Exploit exploit/osx/local/rootpipe 2015-04-09 great Apple OS X Rootpipe Privilege Escalation exploit/osx/local/tpwn 2015-08-16 normal Mac OS X "tpwn" Privilege Escalation exploit/windows/local/ask 2012-01-03 excellent Windows Escalate UAC Execute RunAs exploit/windows/local/bypassuac 2010-12-31 excellent Windows Escalate UAC Protection Bypass exploit/windows/local/bypassuac_eventvwr 2016-08-15 excellent Windows Escalate UAC Protection Bypass (Via Eventvwr Registry Key) exploit/windows/local/bypassuac_injection 2010-12-31 excellent Windows Escalate UAC Protection Bypass (In Memory Injection) exploit/windows/local/bypassuac_vbs 2015-08-22 excellent Windows Escalate UAC Protection Bypass (ScriptHost Vulnerability) exploit/windows/local/ms10_092_schelevator 2010-09-13 excellent Windows Escalate Task Scheduler XML Privilege Escalation exploit/windows/local/service_permissions 2012-10-15 great Windows Escalate Service Permissions Local Privilege Escalation exploit/windows/local/trusted_service_path 2001-10-25 excellent Windows Service Trusted Path Privilege Escalation payload/cmd/mainframe/apf_privesc_jcl normal JCL to Escalate Privileges post/multi/escalate/aws_create_iam_user normal Create an AWS IAM User post/multi/escalate/cups_root_file_read 2012-11-20 normal CUPS 1.6.1 Root File Read post/multi/escalate/metasploit_pcaplog 2012-07-16 manual Multi Escalate Metasploit pcap_log Local Privilege Escalation post/windows/escalate/droplnk normal Windows Escalate SMB Icon LNK Dropper post/windows/escalate/getsystem normal Windows Escalate Get System via Administrator post/windows/escalate/golden_ticket normal Windows Escalate Golden Ticket post/windows/escalate/ms10_073_kbdlayout 2010-10-12 normal Windows Escalate NtUserLoadKeyboardLayoutEx Privilege Escalation post/windows/escalate/screen_unlock normal Windows Escalate Locked Desktop Unlocker