pWnOS v2.0

        该靶机绑定了静态IP地址 10.10.10.100,所以这里需要修改我们的网络配置!整个网段修改为10.10.10.0/24

信息收集

主机存活探测
arp-scan -l
端口信息探测
nmap -sT --min-rate 10000 -p- 10.10.10.100		(只开放了22 80端口)
服务版本信息探测
nmap -sT -sV -sC -O -p22,80 10.10.10.100

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 5.8p1 Debian 1ubuntu3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   1024 85:d3:2b:01:09:42:7b:20:4e:30:03:6d:d1:8f:95:ff (DSA)
|   2048 30:7a:31:9a:1b:b8:17:e7:15:df:89:92:0e:cd:58:28 (RSA)
|_  256 10:12:64:4b:7d:ff:6a:87:37:26:38:b1:44:9f:cf:5e (ECDSA)
80/tcp open  http    Apache httpd 2.2.17 ((Ubuntu))
| http-cookie-flags: 
|   /: 
|     PHPSESSID: 
|_      httponly flag not set
|_http-title: Welcome to this Site!
|_http-server-header: Apache/2.2.17 (Ubuntu)
MAC Address: 00:0C:29:40:8B:28 (VMware)
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 2.6.X
OS CPE: cpe:/o:linux:linux_kernel:2.6
OS details: Linux 2.6.32 - 2.6.39
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

漏洞脚本探测
nmap -sT --script=vuln -p22,80 10.10.10.100

PORT   STATE SERVICE                                                                                           
22/tcp open  ssh                                                                                               
80/tcp open  http                                                                                              
|_http-vuln-cve2017-1001000: ERROR: Script execution failed (use -d to debug)
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
| http-csrf: 
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=10.10.10.100
|   Found the following possible CSRF vulnerabilities: 
|     
|     Path: http://10.10.10.100:80/login.php
|     Form id: 
|     Form action: login.php
|     
|     Path: http://10.10.10.100:80/register.php
|     Form id: 
|_    Form action: register.php
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-cookie-flags: 
|   /: 
|     PHPSESSID: 
|       httponly flag not set
|   /login.php: 
|     PHPSESSID: 
|       httponly flag not set
|   /login/: 
|     PHPSESSID: 
|       httponly flag not set
|   /index/: 
|     PHPSESSID: 
|       httponly flag not set
|   /register/: 
|     PHPSESSID: 
|_      httponly flag not set
| http-enum: 
|   /blog/: Blog
|   /login.php: Possible admin folder
|   /login/: Login page
|   /info.php: Possible information file
|   /icons/: Potentially interesting folder w/ directory listing
|   /includes/: Potentially interesting directory w/ listing on 'apache/2.2.17 (ubuntu)'
|   /index/: Potentially interesting folder
|   /info/: Potentially interesting folder
|_  /register/: Potentially interesting folder
MAC Address: 00:0C:29:40:8B:28 (VMware)

Web渗透测试

没别的什么端口,直接看80上的服务:

存在登录和注册的页面,登陆界面,没测试注册页面:

抓包进行测试,虽然是email的地址,但是我们可以在home页面就能收集到admin的邮箱地址是什么,不知道是否存在弱口令,或者是能够进行爆破!

明文传输,因此我们可以尝试进行密码的爆破!(但是成功的爆破出来)

有没有sql注入呢?

虽然说存在WAF,但是他好像是已经welcome了?

换一下payload,条件不成立,显然界面已经是回到了登录的界面,可见是存在sql注入的,不过需要进行绕过!上sqlmap!

拿到三个数据库:

直接一键化:

killerbeesareflying

拿到管理员的密码!

回去登陆下看看:

啊???这就是我登陆后给我的礼物嘛??

目录扫描

发现了很多的目录:

info.php界面:

所有的东西都是需要进行登录的,一直没找到突破口,发现存在内部的博客系统:

收集到对应的版本号信息:

找了找关于SPHPBLOG 的漏洞,最终在msf中成功找到

存在文件上传漏洞!需要配置一下sphpblog的地址(默认配置的地址是/sphpblog,而目标是/blog)

利用msf进行攻击成功收到会话!

拿到一个低权限的账号!

提权

本想尝试内核漏洞溢出,找了找 好像都不合适,然后sudo -l命令还用不了,看看passwd文件:

dan用户,跟我之前的猜测没什么问题,外国人都叫姓~

看看网站的目录下面存在什么东西吧:

发现在/var/www下面就存在一个和数据库相关的东西:

blog下面的config目录下存在一个password.txt文件:

然而并不知道这个是什么加密~

mysql的配置文件:

尝试登录数据库:

登陆失败了。后面发现再上一级目录下还存在这个数据库的文件~

在尝试一下这个密码,成功登录!

ssh能不能登录?

登陆成功!

相关推荐

  1. MySQL商城数据表(20-29

    2023-12-11 04:46:02       29 阅读
  2. c++<span style='color:red;'>20</span>

    c++20

    2023-12-11 04:46:02      46 阅读
  3. Day20.

    2023-12-11 04:46:02       34 阅读
  4. AlgorithmDay20

    2023-12-11 04:46:02       38 阅读
  5. ubuntu 18/20/22 安装 mysql 数据库

    2023-12-11 04:46:02       61 阅读
  6. 2024.7.20-22学习日报

    2023-12-11 04:46:02       15 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-11 04:46:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-11 04:46:02       106 阅读
  3. 在Django里面运行非项目文件

    2023-12-11 04:46:02       87 阅读
  4. Python语言-面向对象

    2023-12-11 04:46:02       96 阅读

热门阅读

  1. Git命令---绑定远程仓库

    2023-12-11 04:46:02       64 阅读
  2. 天池SQL训练营(六)-综合练习题-10道经典题目

    2023-12-11 04:46:02       40 阅读
  3. MySQL面试题

    2023-12-11 04:46:02       58 阅读
  4. 深入理解 Go 函数:从基础到高级

    2023-12-11 04:46:02       60 阅读
  5. 图的深度和广度优先遍历

    2023-12-11 04:46:02       48 阅读
  6. NeuralKG运行备忘

    2023-12-11 04:46:02       62 阅读
  7. ngixn 准备

    2023-12-11 04:46:02       48 阅读
  8. python 高速去重比list 快速

    2023-12-11 04:46:02       58 阅读
  9. 2023阿里智能互联算法工程师 机器学习一面

    2023-12-11 04:46:02       54 阅读
  10. Linux下开发常用的CVS使用手册

    2023-12-11 04:46:02       49 阅读