HackTheBox - Machines - OnlyForYou
Hack The Box - Machines - OnlyForYou
开启机器后访问ip地址自动跳转域名,将其ip地址和域名写入hosts文件
1. 信息搜集
C:\Users\kami>nmap -sS -sC -sV -A -p- 10.10.11.210Nmap scan report for only4you.htb (10.10.11.210)Host is up (0.60s latency).Not shown: 65533 closed tcp ports (reset)PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)| ssh-hostkey:| 3072 e883e0a9fd43df38198aaa35438411ec (RSA)| 256 83f235229b03860c16cfb3fa9f5acd08 (ECDSA)|_ 256 445f7aa377690a77789b04 ...
红日ATT&CK内网练习
红日ATT&CK靶场 - 四
1. 环境搭建
攻击机Win10:192.168.3.27 物理机
WEB服务器:192.168.221.128 VMnet1(网卡2):192.168.183.132
web服务器启动docker: sudo docker start ec 17 09 bb da 3d ab ad
域成员机Win7:192.168.183.129 VMnet1
DC:192.168.183.130 VMnet1
Web服务器账号密码:ubuntu ubuntu
Win7域成员:demo\douser Dotest123
DC:demo\administrator Test2008 开机强制修改密码为 QwEr…123.
2. 信息搜集
Nmap先偷袭扫描一下 Nmap -sV -sC -sS 192.168.221.128Starting Nmap 7.92 ( https://nmap.org ) at 2022-05-25 15:51 中国标准时间Nmap scan report for 192.168.221.128Host is up (0 ...
HackTheBox - Machines - NodeBlog
Hack The Box - Machines - NodeBlog
靶机:10.10.11.139 攻击机:10.10.14.28
1. 信息搜集
C:\\Users\\kami\\Desktop>nmap -sS -sC -sV -A -p- 10.10.11.139 Starting Nmap 7.92 ( https://nmap.org ) at 2022-03-07 19:06 中国标准时间 Nmap scan report for 10.10.11.139 Host is up (0.28s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 3072 ea:84:21:a3:22:4a:7d:f9:b5:25:51:79:83:a ...
HackTheBox - Machines - Driver
Hack The Box - Machines - Driver
靶机:10.10.11.106 攻击机:10.10.14.28
1. 信息搜集
Nmap -sS -sC -sV -A 10.10.11.106 Nmap scan report for 10.10.11.106 Host is up (0.24s latency). Not shown: 997 filtered tcp ports (no-response) PORT STATE SERVICE VERSION 80/tcp open http Microsoft IIS httpd 10.0 | http-auth: | HTTP/1.1 401 Unauthorized\\x0D |\_ Basic realm=MFP Firmware Update Center. Please enter password for admin | http-methods: |\_ Potentially risky methods: TRACE |\_htt ...
HackTheBox - Machines - GoodGames
HacktheBox - Machines - GoodGame
靶机ip:10.10.11.130 攻击机IP:10.10.14.28
1.信息搜集
Nmap scan report for 10.10.11.130 Host is up (0.30s latency). Not shown: 999 closed tcp ports (reset) PORT STATE SERVICE VERSION 80/tcp open http Apache httpd 2.4.51 |\_http-title: GoodGames | Community and Store |\_http-server-header: Werkzeug/2.0.2 Python/3.9.2 Service Info: Host: goodgames.htb Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 I ...
HackTheBox - Machines - Horizontall
HackTheBox - Machines - Horizontall
本机ip:10.10.14.35 靶机ip:10.10.11.105
1.信息搜集
一般nmap挂着扫端口的同时进行子域名爆破,这里Nmap结果先出来,一如既往开放了22端口和80端口
命令:Nmap -sS -sC -sV -O -T4 10.10.11.05Nmap scan report for 10.10.11.105Host is up (0.30s latency).Not shown: 998 closed tcp ports (reset)PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)| ssh-hostkey:| 2048 ee:77:41:43:d4:82:bd:3e:6e:6e:50:cd:ff:6b:0d:d5 (RSA)| 256 3a:d5:89:d5:da:95:59:d9:df:01:68:37:ca:d5 ...
HackTheBox - Machines - Pandora.
HackTheBox - Machines - Pandora.
目标地址:10.10.11.136 攻击机地址:10.10.14.24
1.信息搜集
首先Nmap扫描端口,扫描靶机的地址,得知 22(SSH)、80(Web)端口开放,那么先到web页面看看有没有什么信息或可利用点
命令:nmap -sS -sV -sC -T4 10.10.11.136Nmap scan report for 10.10.11.136Host is up (0.31s latency).Not shown: 998 closed tcp ports (reset)PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)| ssh-hostkey:| 3072 24:c2:95:a5:c3:0b:3f:f3:17:3c:68:d7:af:2b:53:38 (RSA)| 256 b1:41:77:99:46:9a:6c:5d: ...
LFI到LXD提权 - 起始点
LFI到LXD提权
1.LFI本地文件包含
靶机地址为10.129.95.185 攻击机ip为:10.10.14.90
Nmap扫描结果可以看到开启了80端口http服务,并且这个url看起来好眼熟的样子。
这个url已经很明显了,直接测试一手…/…/…/…/…/…/…/…/etc/passwd
果然是本地文件包含,再用burp跑一跑,看看其他信息。
抓包 -> Send Intruder -> 选择好要替换的位置 -> 因为靶机是linux,所以直接选择local file - linux即可
这里仅仅是一个使用burp的小技巧,随便看了点靶机的信息。
因为有一个问题需要回答:目标机器通过UDP运行了什么服务
不得不用Nmap -sU再次扫描UDP端口
发现靶机UDP上开启了tftp,tftp是一种提供无需身份验证的基本文件传输功能
在默认情况下,tftp是不需要身份验证的,任何人都可以连接且上传文件,结合web端的本地文件包含,就可以直接getshell。
2.TFTP传输文件Getshell
因为不需要密码,所以直接连接,输入问号查看一下命令是如 ...
XXE到提权 - 起始点
XXE到提权
1.简单爆破登陆页面
靶机地址:10.129.95.192 攻击机地址:10.10.14.38
Nmap扫描出来的结果是只开放了两个端口,80、443和22端口
并且系统是windows的
ssh直接放弃爆破hhh,访问web页面
发现是一个登陆的窗口,此时用burp爆破一下密码,后台挂着。
然后去网上搜一下是否有 Megacorp 相关的Nday可利用
然而并没有搜到什么有用的信息,但是burp传来了好消息
账户名:admin 密码:password
登陆成功,来到主页面
2.XXE到SSH连接
找到一处功能点,一处表单提交订购单子的地方,随便传点数据,抓包看看
发现是用xml进行传输的数据,那试想一下有没有可能存在xxe?
构造好payload之后发送,发现报错了,忘记了系统是windows的系统,这里确实存在xxe。
接下来再读一下windows的一些文件
注:这里只有将调用实体写在中间参数才有回显。
这样慢慢去找文件的话会消耗很长的时间,在html源码中,发现一个名叫daniel的修改了网页源代码
根据之前的经验,结合问题中有这么一项 ...
Impacket使用 - 起始点
以下在靶场中属于very easy难度。
使用Impacket登录mssql
Impacket项目地址:https://github.com/SecureAuthCorp/impacket
linux安装:
git clone https://github.com/SecureAuthCorp/impacket
python3 -m pip install tox
python3 setup.py install
Windows安装:
将Impacket下载到本地,pip install tox
python setup.py install
安装完成之后会在当前目录下面生成impacket和examples文件夹,里面有各种脚本
0x01. Nmap扫描
使用Nmap扫描靶机的端口发现开启了445 SMB 和 1433 mssql
由于靶机已经关闭,所以这里smb登录就没有截图了,windows下直接\\ip地址就可以了
对445端口进行了无密码登录尝试,登录之后看到一个配置文件里面有mssql的账号和密码
0x02. 登录mssql:
cd examples
python ms ...