《渗透攻击红队百科全书》--笔记

本文地址:https://blog.csdn.net/qq_42942594/article/details/108015364

1.前言

1.1红队(RedTeam)

自动化的发起大规模、海量节点的实战攻击,以便测试用户在各个业务场景的应急响应能力。

鱼叉攻击

钓鱼一般是无特定目标的,愿者上钩。
鱼叉攻击是针对特定目标的钓鱼攻击。

水坑攻击

水坑攻击时一种看似简单但成功率较高的网络攻击方式。攻击目标多为特定的团体(组织、行业、地区等)。攻击者首先通过猜测(或观察)确定这组目标经常访问的网站,然后入侵其中一个或多个网站,植入恶意软件。在目标访问该网站时,会被重定向到恶意网址或触发恶意软件执行,导致该组目标中部分成员甚至全部成员被感染。按照这个思路,水坑攻击其实也可以算是鱼叉式钓鱼的一种延伸。

1.2网络攻击杀伤链(Cyber kill Chain)

杀伤链共有发现-定位-跟踪-瞄准-打击-达成目标六个环节,在越早的杀伤链环节阻止攻击,防护效果就越好。例如,攻击者取得的信息越少,这些信息被第三人利用来发起进攻的可能性也会越低。
参考:https://www.freebuf.com/column/160412.html
在这里插入图片描述

1.3 MITRE ATT&CK

MITRE ATT&CK作为一个知识库,必然是对网络安全相关领域的总结与描述。
参考:https://blog.csdn.net/ybdesire/article/details/101476876
在这里插入图片描述

2. 信息收集

2.1主机发现

2.1.1nmap

nmap 中文文档:https://nmap.org/man/zh/index.html

2.1.2 masscan

项目地址:https://github.com/robertdavidgraham/masscan

2.1.2.1 masscan VS nmap

masscan VS nmap VS Zmap:https://www.freebuf.com/sectool/119340.html

名称使用环境速度
nmap全操作系统
masscanlinux、MAC OS6分钟扫描全网
Zmaplinux、MAC OS5分钟扫描全网

2.1.3 nbtscan

nbtscanwindows NetBIOS主机名扫描工具(好像没啥用)
在这里插入图片描述

2.1.4 hping3

hping3 主要是测试防火墙的拦截规则,对网络设备进行测试
sudo hping3 --scan 1-1000 -S 192.168.1.14

在这里插入图片描述

2.1.4.1 DRDDOS

hping3 --udp -a 114.114.114.114 -p 53 114.114.114.114 -c 5
基于UDP的DOS

2.2关联信息生成

2.2.1 字典生成

2.2.1.1 pydictor

项目地址:https://github.com/LandGrey/pydictor
功能:合并去重多字典组合攻击

2.3 开放漏洞情报

2.3.1 常用网站

  • CVE
  • Exploit-DB
  • CX Security
  • CNVD
  • securitytracker
2.3.1.1 Search Exploit-DB
eg:
searchsploit -t windows local
eg:
searchsploit -t apache

2.4 开源情报信息收集(OSINT)

2.4.1 搜索引擎

  • 百度
  • 谷歌
  • 必应

2.4.2 在线接口

  • http://ce.baidu.com/index/getRelatedSites?site_address=baidu.com
  • https://github.com/rshipp/awesome-malware-analysis/blob/master/恶意软件分析大合集.md#域名分析
  • https://www.webscan.cc/ 同ip旁站检测
  • https://censys.io/ 网络空间搜索引擎
  • https://crt.sh/?q=
  • https://dnsdumpster.com/
  • https://www.threatcrowd.org/searchApi/v2/domain/report/?domain=baidu.com
  • https://findsubdomains.com/
  • https://dnslytics.com/search?q=www.baidu.com
  • https://pentest-tools.com/information-gathering/find-subdomains-of-domain
  • https://viewdns.info/
  • https://www.ipneighbour.com/#/lookup/114.114.114.114
  • https://securitytrails.com/list/apex_domain/baidu.com
  • https://url.fht.im/
  • htt://api.hackertarget.com/hostsearch/?q=baidu.com
  • http://www.yunsee.cn/finger.html

eg:
在这里插入图片描述

2.4.3 DNS历史解析记录

  • DNSDB https://dnsdb.io/zh-cn/
  • 微步在线 https://x.threatbook.cn/
  • netcraft https://sitereport.netcraft.com/?
  • viewdns https://viewdns.info/
  • ipip https://tools.ipip.net/cdn.php

2.5 Github Hacking

反正就是在github里搜索就对了,语法什么的慢慢查吧

2.5.1 自动化工具

2.5.1.1 GitMiner

项目地址:https://github.com/UnkL4b/GitMiner

2.6 Google Hacking

挺复杂的自己找资料吧
eg: site:"xxx.com" intext: index of / | ../ | parent Directory

2.7 Git-all-secret

功能:克隆github仓库并扫描
扫描过程中需要借助开源工具:truffleHog,repo-supervisor
推荐使用docker

mailsniper.ps1 获取outlook所有联系人

条件

掌握其中一个用户邮箱的账户密码,并且可以登录outlook

3.内网渗透之信息收集

3.1 Windows(工作组和域)

检查当前shell权限

whoami /user && whoami /priv
在这里插入图片描述

查看当前路径

chdir
在这里插入图片描述

查看系统信息

systeminfo
在这里插入图片描述

tcp/udp 网络连接状态

netsat -ano

机器名

hostname

查看当前操作系统

wmic OS get Caption,CSDVersion,OSArchitecture,Version

查看杀软

WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List
在这里插入图片描述

查看当前安装的程序

wmic product get name,version

查看在线用户

quser (我电脑上用不了)

查看网络配置

ipconfig /all

查看进程

tasklist /v
有些进程可能是域用户开启的=> 通过管理员权限 凭证窃取 => 窃取域用户凭证

结束进程

taskkill /pid 编号 /f

查看当前登录域

net config workstation

远程桌面连接历史记录

cmdkey /l

查看本机上的用户账户列表

net user

查看本机用户xxx的信息

net user xxx
eg: net user administrator

查看本机用户xxx的信息

net user /domain 查看所在域的用户名单
net user 域用户 /domain 获取某个域用户的详细信息
net user /domain xxx 123456 修改域用户密码,需要域管理员权限

3.2 Windows (域)

  • nltest /domain_trusts /all_trusts /v /server:192.168.52.2 返回所有信任192.168.52.2的…
  • nltest /dsgetdc:hack /server:192.168.52.2 返回域控和其相应的IP地址
  • net user /do 获取域用户列表
  • net group "domain admin" /domain 获取域管理员列表
  • net group "domain controllers" /domain 查看域控制器(如果有多台)
  • net group "domain computers" /domain 查看域机器
  • net group /domain 查看域中的工作组
  • net localgroup administrators 本机管理员
  • net localgroup administrators /domain 登录本机的域管理员
  • net localgroup administrators workgroup\user001 /add 域用户添加到本机
  • net view 查看同一域机器列表
  • net view \\ip 查看某共享
  • net view \\GHQ 查看GHQ计算机的共享资源列表
  • net view /domain 查看内网存在多少个域
  • net view /domain:XYZ 查看XYZ域中的机器列表

3.3 Linux

  • whoami 查看当前权限
  • ifconfig 查看网卡配置
  • netstart -anpt 查看端口状态(开启了那些服务,内网IP连接等)
  • ps -ef 查看进程状态(开启了那些服务)
  • cat /root/.bash_history 查看管理员的历史输入命令(获取密码,网站目录,内网资产信息)
  • find / -name *.cfg 查找某个文件(寻找配置文件等)

后渗透信息收集之wmic命令的一些使用方法

简单来说就是个命令行的windows管理工具

  • wmic /? 查看WMIC命令的全局设置,WMIC全局选项可以用来设置WMIC环境的各种属性,通过集合。。。。。
  • process /? 进程管理的帮助
  • wmic process get /? 属性获取帮助
  • wmic proces get caption,executablepath, processid 获取系统当前正在运行的进程、进程。。。。。
  • wmic service where (state="running") get name, processid, pathname, startmode,caption
  • wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,processid
  • wmic onboarddevice get Description, DeviceType, Enable, Status /format:list
  • wmic product get name 系统安装软件情况
  • wmic environment get Description, VariableValue 系统环境变量
  • wmic computersystem get Name, Domain, Manufacturer, Model, Username, Roles/format:list
  • wmic sysdriver get Caption, Name, PathName, ServiceType, State, Status /format:list

关于powershell 的Get-Wmi对象

  • Get-Wmiobject -list 自己的windows计算机支持那些可用的WMI类
    Get-Wmiobject 相当于wmic的升级版
    未完待续。。。
  • 16
    点赞
  • 72
    收藏
    觉得还不错? 一键收藏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值