【Hack The Box】windows练习-- legacy

这篇具有很好参考价值的文章主要介绍了【Hack The Box】windows练习-- legacy。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

HTB 学习笔记

【Hack The Box】windows练习-- legacy


🔥系列专栏:Hack The Box
🎉欢迎关注🔎点赞👍收藏⭐️留言📝
📆首发时间:🌴2022年9月7日🌴
🍭作者水平很有限,如果发现错误,还望告知,感谢!

信息收集

信息收集的手法与linux一致
namo即可

PORT    STATE SERVICE      VERSION
135/tcp open  msrpc        Microsoft Windows RPC
139/tcp open  netbios-ssn  Microsoft Windows netbios-ssn
445/tcp open  microsoft-ds Windows XP microsoft-ds
Device type: general purpose|specialized
Running (JUST GUESSING): Microsoft Windows XP|2003|2000|2008 (92%), General Dynamics embedded (85%)
OS CPE: cpe:/o:microsoft:windows_xp::sp3 cpe:/o:microsoft:windows_server_2003::sp1 cpe:/o:microsoft:windows_server_2003::sp2 cpe:/o:microsoft:windows_2000::sp4 cpe:/o:microsoft:windows_server_2008::sp2
Aggressive OS guesses: Microsoft Windows XP SP3 (92%), Microsoft Windows XP SP2 (91%), Microsoft Windows Server 2003 SP1 or SP2 (90%), Microsoft Windows Server 2003 SP2 (90%), Microsoft Windows 2003 SP2 (90%), Microsoft Windows XP SP2 or Windows Server 2003 (89%), Microsoft Windows XP Professional SP3 (88%), Microsoft Windows XP SP2 or SP3 (88%), Microsoft Windows Server 2003 (88%), Microsoft Windows 2000 SP4 or Windows XP Professional SP1 (88%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
Service Info: OSs: Windows, Windows XP; CPE: cpe:/o:microsoft:windows, cpe:/o:microsoft:windows_xp

Host script results:
| smb-security-mode: 
|   account_used: guest
|   authentication_level: user
|   challenge_response: supported
|_  message_signing: disabled (dangerous, but default)
|_nbstat: NetBIOS name: nil, NetBIOS user: <unknown>, NetBIOS MAC: 00505696a83e (VMware)
|_clock-skew: mean: 5d00h57m40s, deviation: 1h24m49s, median: 4d23h57m41s
|_smb2-time: Protocol negotiation failed (SMB2)
| smb-os-discovery: 
|   OS: Windows XP (Windows 2000 LAN Manager)
|   OS CPE: cpe:/o:microsoft:windows_xp::-
|   Computer name: legacy
|   NetBIOS computer name: LEGACY\x00
|   Workgroup: HTB\x00
|_  System time: 2022-11-02T13:03:13+02:00

发现存在的服务是445,并且nmap跑出来的是winxp 或者2003,这个版本的机器可能存在永恒之蓝的漏洞
但这都是猜测,有很多种扫描的方法,可以使用nmap的自动扫描,也可以使用脚本

枚举smb服务

smbmap -H [IP]

smbmap啥也没有枚举出来
【Hack The Box】windows练习-- legacy

扫描

这一个环节是我第一次学到,因为以都是针对于web,对于服务的枚举将是我本次学习到的最佳技巧

nmap -p 445 --script vuln 10.129.6.213
当然我认为如果你是第一次使用这个脚本去运行,你最好执行下面的命令,否则这可能会让你扫描不出任何的漏洞
nmap --script-updatedb
└─# nmap --script=vuln -p 445 10.129.6.213
Starting Nmap 7.93 ( https://nmap.org ) at 2022-10-28 05:49 EDT
Nmap scan report for 10.129.6.213
Host is up (0.31s latency).

PORT    STATE SERVICE
445/tcp open  microsoft-ds

Host script results:
|_smb-vuln-ms10-061: Could not negotiate a connection:SMB: Failed to receive bytes: EOF
|_samba-vuln-cve-2012-1182: NT_STATUS_ACCESS_DENIED
|_smb-vuln-ms10-054: false
| smb-vuln-ms08-067: 
|   VULNERABLE:
|   Microsoft Windows system vulnerable to remote code execution (MS08-067)
|     State: VULNERABLE
|     IDs:  CVE:CVE-2008-4250
|           The Server service in Microsoft Windows 2000 SP4, XP SP2 and SP3, Server 2003 SP1 and SP2,
|           Vista Gold and SP1, Server 2008, and 7 Pre-Beta allows remote attackers to execute arbitrary
|           code via a crafted RPC request that triggers the overflow during path canonicalization.
|           
|     Disclosure date: 2008-10-23
|     References:
|       https://technet.microsoft.com/en-us/library/security/ms08-067.aspx
|_      https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4250

Nmap done: 1 IP address (1 host up) scanned in 29.11 seconds
                                                               

很好,结论如下

存在ms08-067
ms17-010

这个靶场就仅仅利用一个漏洞即可,因为我认为这两个差不多

使用msf(建议不要使用)

如果你想获得oscp认证,你最好使用手工的方法
你也可以玩玩msf

msf6 > search ms08-067
【Hack The Box】windows练习-- legacy很简单,就不继续了,直接拿到system了
借着搜索一下需要的文本
这里是我学到的第二个东西
我可以利用它全局搜索,效果极佳

dir "\user.txt" /s
dir "\root.txt" /s

不使用msf(推荐)

事实上无论你准不准备备考oscp,你都应该掌握手工的方法,或者你只想当个脚本小子?

哦对了,如果你刚才运行了msf获取了shell,你必须要关闭靶场并且重新启动,因为msf会占用他的smb服务,你讲一无所获

https://raw.githubusercontent.com/jivoi/pentest/master/exploit_win/ms08-067.py
在这里,你将会发现你将如何利用这个exp
或者,这样搜索
【Hack The Box】windows练习-- legacy
而在url给出的exp中,我们可以发现完整的帮助
这告诉我们我们需要选择一个去利用,如果你实在判断不出来
全部实一遍,你就会有收获
【Hack The Box】windows练习-- legacy并且在这里选择一个你喜欢的命令生成一个payload,覆盖下面的shellcode

【Hack The Box】windows练习-- legacy然后根据你选择的msf脚本生成命令
开启对应的端口监听
而后按照要求运行脚本
你将获取shell
【Hack The Box】windows练习-- legacy【Hack The Box】windows练习-- legacy
执行不了whoami,这是因为Winxp里面没有这个服务
【Hack The Box】windows练习-- legacy
你只需要进入这个目录,而后type打印出来即可文章来源地址https://www.toymoban.com/news/detail-488851.html

到了这里,关于【Hack The Box】windows练习-- legacy的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • hack the box responder

    回答:badminton 首先启动responder并监听本地的tun0网卡,然后由于靶机存在RFI,因此可以远程访问本地的某个文件,使用responder拿到主机的administrator的哈希,然后使用john破解 使用responder监听本地tun0网卡 responder -I tun0

    2023年04月09日
    浏览(35)
  • Hack The Box - 关卡Dancing

    SMB(全称是Server Message Block)是一个协议名,可用于在计算机间共享文件、打印机、串口等,电脑上的网上邻居就是靠它实现的。 SMB 是一种客户机/服务器、请求/响应协议。通过 SMB 协议,客户端应用程序可以在各种网络环境下读、写服务器上的文件,以及对服务器程序提出服务

    2024年02月06日
    浏览(30)
  • Hack The Box - Three(新手友好)

    环境给了一个IP,nmap信息搜集一波 访问10.129.126.35:80,收集有用信息(渗透测试==信息收集) thetoppers.htb应该是域名,把域名和IP加到hosts文件中,tee命令的作用就是读取标准输入内容,将读取到的内容数据写入到标准输出和文件中。 再次访问和之前页面一样,尝试子域名爆破,

    2024年02月07日
    浏览(25)
  • Hack The Box-Sherlocks-Tracer

    A junior SOC analyst on duty has reported multiple alerts indicating the presence of PsExec on a workstation. They verified the alerts and escalated the alerts to tier II. As an Incident responder you triaged the endpoint for artefacts of interest. Now please answer the questions regarding this security event so you can report it to your incident manager. 一名

    2024年01月20日
    浏览(22)
  • Hack The Box - TIER 2 - Archetype Oopsie Vaccine Unified

    这个阶段的,终于不是之前的傻乎乎操作了,到这我才知道,那些问答不是先问答再渗透的。原来是渗透一步回答相应问题,这里涉及到了许多工具、脚本、提权、端口等知识点,收获丰富。 TASK 1 Which TCP port is hosting a database server? 哪个 TCP 端口托管数据库服务器? 答案:1

    2024年02月05日
    浏览(37)
  • Hack The Box -SQL Injection Fundamentals Module详细讲解中文教程

    数据库介绍............................................................................................................... 3 数据库管理系统(DBMS)介绍........................................................................... 3 数据库的类型..................................................................................................

    2024年02月04日
    浏览(26)
  • Unity解决动画不可用:The AnimationClip ‘XXX‘ used by the Animation component ‘XXX‘ must be marked as Legacy.

    在Unity 2019.4.38.f1c1以上的版本,创建的创建Animation Clip无法使用,作为组件的默认Clip的话,那么游戏运行的时候这个Clip其实是播不出来的,而且Console会报一条 “The AnimationClip ‘XXX’ used by the Animation component ‘XXX’ must be marked as Legacy.” 的警告信息,以及一条 “Default clip co

    2023年04月08日
    浏览(38)
  • 已解决 DEPRECATION: configobj is being installed using the legacy ‘setup.py install‘ method, because i

    已解决(pip安装fitz模块报错)DEPRECATION: configobj is being installed using the legacy ‘setup.py install’ method, because it does not have a ‘pyproject.toml’ and the ‘wheel’ package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the ‘–use-pep517’ option. Discussion can be found

    2023年04月20日
    浏览(31)
  • 已解决DEPRECATION: phrasetree is being installed using the legacy ‘setup.py install’ method, because it

    已解决DEPRECATION: phrasetree is being installed using the legacy ‘setup.py install’ method, because it does not have a ‘pyproject.toml’ and the ‘wheel’ package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the ‘–use-pep517’ option. Discussion can be found at https://github.com/pypa/pi

    2023年04月16日
    浏览(32)
  • CSS Hack是什么?ie6,7,8的hack分别是什么

    CSS Hack是一种针对不同浏览器(如Internet Explorer、Firefox、Opera等)的CSS样式特殊写法,通过使用不同的CSS语法或者使用特定条件的判断语句,让CSS代码能够针对不同的浏览器进行差异化渲染,从而达到兼容的目的。 对于Internet Explorer 6、7、8,CSS Hack主要有以下几种写法: 条件

    2024年01月22日
    浏览(27)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包