Kit Oop
0
Posted by admin | Posted in Scale Models | Posted on 12-02-2010
Tags: actionscript, ajax, javascript, library, oop, programming
Searching For Kit Oop ? Limited Offers Below
![]() |
![]() Warhammer Fantasy Skaven GREY SEER from the metal bell kit METAL OOP $9.99 Time Remaining: 2h 28m Buy It Now for only: $9.99 |
![]() Warhammer Fantasy Skaven HERO Great Weapon from the bell kit METAL OOP $4.99 Time Remaining: 2h 30m Buy It Now for only: $4.99 |
![]() 2000 MILL HILL KIT HOLIDAY ANGEL OOP 18 ct fabric band $5.55 (2 Bids) Time Remaining: 5h 1m |
![]() Estes SR 71 Blackbird Model Rocket OOP Looks Like Plastic Kit When Built $14.00 (5 Bids) Time Remaining: 5h 32m |
![]() Walthers N Scale Rolling Mill Kit NIB OOP $81.00 (2 Bids) Time Remaining: 6h 44m |
![]() Walthers N Scale Mijack Container Crane Kit NIB OOP $20.00 Time Remaining: 6h 49m |
![]() Walthers N Scale Mijack Container Crane Kit NIB OOP $20.00 Time Remaining: 6h 49m |
![]() FALLER N Scale ASH PIT w Crane Kit NIB OOP $29.00 Time Remaining: 6h 56m |
![]() Bucilla Teddy Bear Snowman Felt Christmas Stocking Kit OOP Factory Direct $39.99 Time Remaining: 7h 52m Buy It Now for only: $39.99 |
![]() RARE LISA MUNROE VAMPIRE GIRL RESIN MODEL KIT JIM FAWKES SCULPT OOP $102.75 (7 Bids) Time Remaining: 8h 25m |
![]() OOP VICTORIAN POINSETTIA TABLERUNNER STAMPED EMBROIDERY KIT CHRISTMAS BUCILLA $29.99 Time Remaining: 10h 50m Buy It Now for only: $29.99 |
![]() OOP 4 CHRISTMAS GARLAND NAPKINS STAMPED EMBROIDERY KIT BUCILLA BEAUTIFUL $28.99 Time Remaining: 10h 50m Buy It Now for only: $28.99 |
For more well priced, quality Kit Oop Scroll Down Now
Simple Antirootkit
1. SST: references
2. Algorithm
3. Memory mapped files
4. Implementation
5. Demonstration
6. How to build
Written by:
Victor Milokum, Development Leader of Network Security Team.
1. SST: references
This article is a logical continuation to the article "Driver to Hide Processes and Files" http://www.codeproject.com/KB/system/hide-driver.aspx by Ivan Romananko. You can find all necessary information about System Service Table (SST) and its hooking in it.
In this article I would like to present how to write your own unhooker that will restore original SST hooked by drivers like Ivan's one.
2. Algorithm
My goal is to write a simple driver for SST hooking detection and removing purposes.
This means that our driver should not use various Zw-functions and SST table because I suppose that SST table is corrupted by unknown rootkits.
I do not care about filter drivers and function code splicers for now, but maybe I will come back to them in future.
The simplest way to detect and remove hooks is to compare SST that is placed in memory with the initial SST from ntoskernel.exe file.
So the goal is:
- to find ntoskernel module in memory;
- to find the section of ntoskernel where SST is placed and to calculate relative offset of SST in the section;
- to find this section in the ntoskernel.exe file;
- to calculate real address of SST in the file;
- to read values from the file and to compare them with SST.
But before the implementation I would like to present some additional information.
3. Memory mapped files in kernel mode
"A memory-mapped file is a segment of virtual memory which has been assigned a direct byte-for-byte correlation with some portion of a file or file-like resource". (c) Wiki
Yeah, we want to parse the PE file and memory mapped files are very useful for this task.
And it is easy enough to use mapped files API from the kernel mode, because it is very similar to Win32 API. Instead of CreateFileMapping and MapViewOfSection functions in kernel mode driver should access
NTSTATUS ZwCreateSection( OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize OPTIONAL, IN ULONG SectionPageProtection, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL );
and
NTSTATUS ZwMapViewOfSection( IN HANDLE SectionHandle, IN HANDLE ProcessHandle, IN OUT PVOID *BaseAddress, IN ULONG_PTR ZeroBits, IN SIZE_T CommitSize, IN OUT PLARGE_INTEGER SectionOffset OPTIONAL, IN OUT PSIZE_T ViewSize, IN SECTION_INHERIT InheritDisposition, IN ULONG AllocationType, IN ULONG Win32Protect );
functions.
But if we use these functions we will break our own rule not to use SST. Also, it is good for antirootkit to use extremely low level functions in the hope of being invisible to the possible rootkits.
With regard to this we can use undocumented functions of Memory Manager (Mm), of course at our own risk:
NTSTATUS
MmCreateSection ( OUT PVOID *SectionObject, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize, IN ULONG SectionPageProtection, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL, IN PFILE_OBJECT File OPTIONAL ); NTSTATUS
MmMapViewOfSection( IN PVOID SectionToMap, IN PEPROCESS Process, IN OUT PVOID *CapturedBase, IN ULONG_PTR ZeroBits, IN SIZE_T CommitSize, IN OUT PLARGE_INTEGER SectionOffset, IN OUT PSIZE_T CapturedViewSize, IN SECTION_INHERIT InheritDisposition, IN ULONG AllocationType, IN ULONG Protect ); NTSTATUS
MmUnmapViewOfSection( IN PEPROCESS Process, IN PVOID BaseAddress ); NTSTATUS drv_MapAllFileEx(HANDLE hFile OPTIONAL, drv_MappedFile * pMappedFile, LARGE_INTEGER * pFileSize, ULONG Protect)
{ NTSTATUS status = STATUS_SUCCESS; PVOID section = 0; PCHAR pData=0; LARGE_INTEGER offset; offset.QuadPart = 0; // check zero results if (!pFileSize->QuadPart) goto calc_exit; status = MmCreateSection (§ion, SECTION_MAP_READ, 0, // OBJECT ATTRIBUTES pFileSize, // MAXIMUM SIZE Protect, 0x8000000, hFile, 0 ); if (status!= STATUS_SUCCESS) goto calc_exit; status = MmMapViewOfSection(section, PsGetCurrentProcess(), (PVOID*)&pData, 0, 0, &offset, &pFileSize->LowPart, ViewUnmap, 0, Protect); if (status!= STATUS_SUCCESS) goto calc_exit; calc_exit: if (NT_SUCCESS(status)) { pMappedFile->fileSize.QuadPart = pFileSize->QuadPart; pMappedFile->pData = pData; pMappedFile->section = section; } else { if (pData) MmUnmapViewOfSection(PsGetCurrentProcess(), pData); if (section) { ObMakeTemporaryObject(section); ObDereferenceObject(section); } } return status;
}
This example demonstrates an alternative approach to the usage of mapped files through MmCreateSection/MmMapViewOfSection functions.
The presented approach is pretty good because it doesn't utilize Zw* functions and even handles at all, but it has one restriction. If you start this sample from DriverEntry it will work fine, but if you start it from the IRP_MJ_DEVICE_CONTROL handler you will see that MmCreateSection function fails with STATUS_ACCESS_DENIED. Why?
The answer is: Zw* functions do one good thing - they set previous mode to KernelMode and this allows to utilize kernel mode pointers and handles as parameters for them (for more information see Nt vs. Zw - Clearing Confusion On The Native API article - http://www.osronline.com/article.cfm?id=257)
So, the presented above function can be called only from DriverEntry or from the system thread.
4. Algorithm implementation
I designed the following structure to save all ntoskernel parsing results:
#define IMAGE_SIZEOF_SHORT_NAME 8
typedef struct _Drv_VirginityContext
{ drv_MappedFile m_mapped; HANDLE m_hFile; UCHAR m_SectionName[IMAGE_SIZEOF_SHORT_NAME+1]; ULONG m_sstOffsetInSection; char * m_mappedSST; ULONG m_imageBase; char * m_pSectionStart; char * m_pMappedSectionStart; char * m_pLoadedNtAddress;
}Drv_VirginityContext;
And I implemented the chosen algorithm as follows:
static NTSTATUS ResolveSST(Drv_VirginityContext * pContext, SYSTEM_MODULE * pNtOsInfo)
{ PIMAGE_SECTION_HEADER pSection = 0; PIMAGE_SECTION_HEADER pMappedSection = 0; NTSTATUS status = 0; PNTPROC pStartSST = KeServiceDescriptorTable->ntoskrnl.ServiceTable; char * pSectionStart = 0; char * pMappedSectionStart = 0; // Drv_ResolveSectionAddress function detects // to which section pStartSST belongs // pSection will contain the section of ntoskernel.exe that contains SST pContext->m_pLoadedNtAddress = (char*)pNtOsInfo->pAddress; status = Drv_ResolveSectionAddress(pNtOsInfo->pAddress, pStartSST, &pSection); if (!NT_SUCCESS(status)) goto clean; // save section name to context memcpy(pContext->m_SectionName, pSection->Name, IMAGE_SIZEOF_SHORT_NAME); // calculate m_sstOffsetInSection - offset of SST in section pSectionStart = (char *)pNtOsInfo->pAddress + pSection->VirtualAddress; pContext->m_sstOffsetInSection = (char*)pStartSST - pSectionStart; // find section in mapped file - on disk! status = Drv_FindSection(pContext->m_mapped.pData, pSection->Name, &pMappedSection); if (!NT_SUCCESS(status)) goto clean; pMappedSectionStart = (char *)pContext->m_mapped.pData + pMappedSection->PointerToRawData; pContext->m_mappedSST = pMappedSectionStart + pContext->m_sstOffsetInSection; { // don´t forget to save ImageBase PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)pContext->m_mapped.pData; PIMAGE_NT_HEADERS pNTHeader = (PIMAGE_NT_HEADERS)((char*)dosHeader + dosHeader->e_lfanew); pContext->m_imageBase = pNTHeader->OptionalHeader.ImageBase; } pContext->m_pSectionStart = pSectionStart; pContext->m_pMappedSectionStart = pMappedSectionStart;
clean: return status;
}
And here is the function that returns real value of SST:
void Drv_GetRealSSTValue(Drv_VirginityContext * pContext, long index, void ** ppValue)
{ char * pSST = pContext->m_mappedSST; ULONG * pValue = ((ULONG *) pSST) + index; // now pValue points to the mapped SST entry // but entry contains offset from the beginning of ntoskernel file, // so correct it *ppValue = (void*)(*pValue + (ULONG)pContext->m_pLoadedNtAddress – pContext->m_imageBase);
}
After that it is quite simple to implement main functionality:
virtual NTSTATUS ExecuteReal()
{ CAutoVirginity initer; NT_CHECK(initer.Init(&m_virginityContext)); // now we are ready to scan
for(int i = 0, sstSize = Drv_GetSizeOfNtosSST(); i < sstSize; ++i) { void ** pCurrentHandler = Drv_GetNtosSSTEntry(i); void * pRealHandler = 0; Drv_GetRealSSTValue(&m_virginityContext, i, &pRealHandler); if (pRealHandler != *pCurrentHandler) { // oops, we found the difference! // unhook this entry Drv_HookSST(pCurrentHandler, pRealHandler); } } return NT_OK;
}
This tiny cycle completely removes all SST hooks and brings SST to its initial state.
6. Demonstration
For testing purposes I developed simple console utility named unhooker.exe. This utility can be started without parameters; in this case it shows information about its abilities:
- "stat" command shows statistics about SST hooking;
- "unhook" command cleans SST;
This sample demonstrates how to use utility to detect and erase hooks:
Have fun!
6. How to build
Build steps are the same as in the "Hide Driver" article. They are:
- Install Windows Driver Developer Kit 2003 - http://www.microsoft.com/whdc/devtools/ddk/default.mspx
- Set global environment variable "BASEDIR" to path of installed DDK. Go here: Computer -> Properties -> Advanced -> Environment variables ->System Variables -> New
And set it like this: BASEDIR -> c:winddk3790
(You have to restart your computer after this.)
If you choose Visual Studio 2003, then you can simply open UnhookerMain.sln and build all.
Downloads (solution and sources)
About the Author
Apriorit is worldwide provider of professional consulting and software development services.
Company operates in the advanced IT fields like Virtualization, Corporate Security, Driver Development.
www.apriorit.com
![]() |
![]() Warhammer Fantasy Skaven GREY SEER from the metal bell kit METAL OOP $9.99 Time Remaining: 2h 28m Buy It Now for only: $9.99 |
![]() Warhammer Fantasy Skaven HERO Great Weapon from the bell kit METAL OOP $4.99 Time Remaining: 2h 30m Buy It Now for only: $4.99 |
![]() 2000 MILL HILL KIT HOLIDAY ANGEL OOP 18 ct fabric band $5.55 (2 Bids) Time Remaining: 5h 1m |
![]() Estes SR 71 Blackbird Model Rocket OOP Looks Like Plastic Kit When Built $14.00 (5 Bids) Time Remaining: 5h 32m |
![]() Walthers N Scale Rolling Mill Kit NIB OOP $81.00 (2 Bids) Time Remaining: 6h 44m |
![]() Walthers N Scale Mijack Container Crane Kit NIB OOP $20.00 Time Remaining: 6h 48m |
![]() Walthers N Scale Mijack Container Crane Kit NIB OOP $20.00 Time Remaining: 6h 49m |
![]() FALLER N Scale ASH PIT w Crane Kit NIB OOP $29.00 Time Remaining: 6h 56m |
![]() Bucilla Teddy Bear Snowman Felt Christmas Stocking Kit OOP Factory Direct $39.99 Time Remaining: 7h 52m Buy It Now for only: $39.99 |
![]() RARE LISA MUNROE VAMPIRE GIRL RESIN MODEL KIT JIM FAWKES SCULPT OOP $102.75 (7 Bids) Time Remaining: 8h 25m |
![]() OOP VICTORIAN POINSETTIA TABLERUNNER STAMPED EMBROIDERY KIT CHRISTMAS BUCILLA $29.99 Time Remaining: 10h 50m Buy It Now for only: $29.99 |
![]() OOP 4 CHRISTMAS GARLAND NAPKINS STAMPED EMBROIDERY KIT BUCILLA BEAUTIFUL $28.99 Time Remaining: 10h 50m Buy It Now for only: $28.99 |
![]() OOP WHITE POINSETTIA CROSS STITCH ON RED TABLERUNNER KIT CHRISTMAS BUCILLA $29.99 Time Remaining: 10h 50m Buy It Now for only: $29.99 |
![]() OOP HIGH TEA FLORAL BELLPULL ELSA WILLIAMS COUNTED CROSS STITCH KIT BELL PULL $28.99 Time Remaining: 10h 59m Buy It Now for only: $28.99 |
![]() OOP TROPICAL BIRD PARROT BELLPULL COUNTED CROSS STITCH KIT BELL PULL $23.99 Time Remaining: 10h 59m Buy It Now for only: $23.99 |
![]() Textile Heritage Daffodil Crocus Cat NEEDLE CASE OOP $17.95 Time Remaining: 11h 32m Buy It Now for only: $17.95 |
![]() Airfix 72 scale F 80C Shooting Star OOP Vintage kit $6.95 Time Remaining: 11h 55m |
![]() Vintage Renwal 1 72 Lt CE Nungessers Nieuport 17 OOP kit $6.95 Time Remaining: 11h 55m |
![]() Revell 1 72 Boeing X 32A JSF Competitor Kit 04624 NISB OOP Collectors $25.00 Time Remaining: 11h 59m Buy It Now for only: $25.00 |
![]() AUTO ASSEMBLY OFFICE PLANT FORD MOTOR CAR OOP KIT HO Scale $199.95 Time Remaining: 12h 45m Buy It Now for only: $199.95 |
![]() Bucilla Santa Frosty WINTER FUN Felt Christmas Stocking Kit OOP Sterilized $69.99 Time Remaining: 13h 8m Buy It Now for only: $69.99 |
![]() 1 16 120mm M222 Dragon Missile Launcher 1 16 120mm Kirin OOP Model Kit $20.95 Time Remaining: 13h 26m Buy It Now for only: $20.95 |
![]() 1 72 BEECH C 45 EXPEDITOR AIRCRAFT by PIONEER 2 NEW OOP Model Kit $28.95 Time Remaining: 13h 40m Buy It Now for only: $28.95 |
![]() 1 72 HH 60D NIGHT HAWK HELICOPTER SK MODEL NEW OOP Model Kit $28.95 Time Remaining: 13h 40m Buy It Now for only: $28.95 |
![]() 1 72 KAWASAKI KI 32 MARY JAPANESE FIGHTER AVIATION USK NEW OOP Model Kit $37.95 Time Remaining: 13h 40m Buy It Now for only: $37.95 |
![]() Estes SR 71 Spyplane Model Rocket Classic OOP Kit Free Shipping Compare $26.95 Time Remaining: 14h 19m Buy It Now for only: $26.95 |
![]() 1 25 SIDEWINDER OMNI O24 Sports Car AIRFIX MPC OOP Model Kit $29.95 Time Remaining: 14h 44m Buy It Now for only: $29.95 |
![]() Messerchmit Me 109 H 1 72 Pegasus OOP Limited run Plastic Kit $7.75 Time Remaining: 15h 44m |
![]() OOP BABY DIAPER BAG INFANT CHANGING KIT PAD MAT SEWING PATTERN McCalls 5339 $17.99 Time Remaining: 16h 16m Buy It Now for only: $17.99 |
![]() Janlynn Big Stitch Grapes On The Vine Counted Cross Stitch Kit New NISP OOP HTF $22.95 Time Remaining: 18h 37m Buy It Now for only: $22.95 |
![]() Airfix 72 scale Douglas TBD 1 Devastator OOP Vintage kit $6.95 Time Remaining: 18h 52m |
![]() Bucilla Christmas Joy Felt Christmas Stocking Kit OOP $119.99 Time Remaining: 20h 15m Buy It Now for only: $119.99 |
![]() BucillaKITTYS CHRISTMAS Cat Felt Stocking Kit RARE OOP CompletelySterilized $69.99 Time Remaining: 20h 57m Buy It Now for only: $69.99 |
![]() Mark Martin 6 Valvoline Thunderbird Monogram 2959 NIB OOP $8.00 Time Remaining: 23h 18m Buy It Now for only: $8.00 |
![]() Working Decoy Plans Kit 1 A Sneak Box Studio Book Make Own Duck Decoy OOP Kit $89.99 Time Remaining: 1d Buy It Now for only: $89.99 |
![]() PENGUIN PROMENADE by Roger Reinhardy VTG OOP LongStitch Needlepoint Kit WOOL $59.99 Time Remaining: 1d 5h 5m Buy It Now for only: $79.00 |
![]() Needlepoint Kit Sunset CHURCH IN THE GLEN Mint OOP Sealed Birch Pond Daffodils $12.50 Time Remaining: 1d 8h 27m Buy It Now for only: $12.50 |
![]() Vintage Rocket Lot of 3 kits MPC Nike Patriot Tomahawk more OOP NIB NR $24.95 (1 Bid) Time Remaining: 1d 9h 11m |
![]() Universal Tarot Cards Book Maria Shaw Kit Teen NIB OOP $0.99 Time Remaining: 1d 9h 11m Buy It Now for only: $15.99 |
![]() MPC Minirocs Taurus 1 Model Rocket kit Rare OOP Great detailed kit NIP NR $9.95 Time Remaining: 1d 9h 14m |
![]() MPC Lunar Patrol 60s kit with twin gliders OOP NIB $15.95 Time Remaining: 1d 9h 15m |
![]() 1 72 Macchi C202 Folgore Combo 2 kits Hasegawa OOP $49.99 Time Remaining: 1d 10h 31m Buy It Now for only: $49.99 |
![]() 1 72 Me 109G 6 G 14 Combos Hartmann 2 Kits Hasegawa OOP $39.99 Time Remaining: 1d 10h 31m Buy It Now for only: $39.99 |
![]() SUPERRARE CLASSIC MONSTERS PLAYING POKER RESIN MODEL KIT OOP $200.00 Time Remaining: 1d 10h 39m |
![]() Textile Heritage FAIRIES Bookmark Cross Stitch Kit OOP $14.95 Time Remaining: 1d 10h 51m Buy It Now for only: $14.95 |
![]() OOP Revell 1 24 3 1997 Earnhardt Goodwrench MC Clear Ed Mint $15.99 Time Remaining: 1d 11h 5m |
![]() 18 25 Spring Slhouettes QUILT FABRIC STRIPS JELLY ROLL KIT RARE SHIPS FREE OOP $16.55 Time Remaining: 1d 11h 39m |
![]() Bucilla 12 Days of Christmas Felt Tree Skirt or Table Cover Kit Brand New OOP $99.99 Time Remaining: 1d 12h 10m |
![]() Gigantics HUGE TARANTULA DIORAMA model kit AMT Ertl Sealed Plastic kit oop 1996 $4.99 Time Remaining: 1d 12h 16m |
![]() Airfix 72 scale Douglas Boston OOP Vintage kit $6.95 Time Remaining: 1d 12h 27m |
![]() Bucilla NO PEEKING Felt Christmas Stocking Kit OOP $79.95 Time Remaining: 1d 13h 45m Buy It Now for only: $79.95 |
![]() Vtg Bernat NOEL CHRISTMAS STOCKING Latch Hook Kit Jumbo OOP $49.99 Time Remaining: 1d 14h 10m Buy It Now for only: $49.99 |
![]() KC 135A STRATOTANKER MIB NEW SEALED HUGE KIT 8848 BOEING OOP RARE $0.55 (6 Bids) Time Remaining: 1d 14h 12m |
![]() B 52G LATEMODEL STRATOFORTRESS LATE MODEL MIB OOP SEALED HUGE KIT 8625 RARE $23.50 (20 Bids) Time Remaining: 1d 14h 12m |
![]() 1 72 AMT ERTL BELL UH 1D HUEY SEALED INSIDE OOP KIT EXTRA NICE EX ESCI LOOK $15.99 (2 Bids) Time Remaining: 1d 14h 20m |
![]() ESTES 2179 GUARDIAN KIT MILITARY SCALE LIKE MULTI FIN MISSILE OOP NIB $6.50 Time Remaining: 1d 14h 54m |
![]() ESTES 1278 GAUCHITO SCALE KIT ANSARI X PRIZE OOP NEW $4.50 Time Remaining: 1d 14h 57m |
![]() Bucilla Santa TREE TRIMMING Felt Christmas Stocking Kit OOP Factory Direct 18 $24.99 Time Remaining: 1d 15h 37m |
![]() TEN STAMP MILL CAMPBELL 450 OOP N SCALE WOOD KIT $43.00 Time Remaining: 1d 15h 58m Buy It Now for only: $43.00 |
![]() Bucilla Santa SLEDDING FRIENDS Felt Christmas Stocking Kit OOP Factory Direct $69.99 Time Remaining: 1d 16h 9m Buy It Now for only: $69.99 |





























































