суббота, 24 августа 2013 г.

exref.pl

a very common problem in static code analysis is finding an exported functions that refers to some desired address. For example KseEngine has 21 references in windows kernel but only 5 of these functions are exported
So I wrote simple perl script for IDA Pro to automate this boring work. Sample of output for KseEngine:
_KseQueryDeviceFlags@12: 74A6C1 addr 74A6E2
_KseQueryDeviceData@20: 74A75B addr 74A77A
_KseQueryDeviceDataList@16: 7A5E74 addr 7A5E95
_KseSetDeviceFlags@16: 7A672D addr 7A6760
_KseUnregisterShim@12: 7A692B addr 7A698B

среда, 21 августа 2013 г.

wincheck rc8.49

Download mirror
Changelog:
  • add checking of shims inside apphelp.dll
  • add checking of ole32 hook callbacks like pfnInitHookOle/pfnUninitHookOle/pfnEnableHookObject etc
  • add some identification of applications within AppContainer
  • add checking of KernelBase.dll!pfnAdjustObjectAttributesForPrivateNamespace (windows 8.1 only)
  • some other bugs were fixed

среда, 7 августа 2013 г.

how to find ntdll!LdrpHashTable

Old article (warning - it is written in French and has eye-breaking font) describes a good idea of loaded modules cross-scaning using LdrpHashTable. But Ivanlef0u did not show how you can find address of LdrpHashTable with static analysis
It seems that this is not easy task - xrefs to LdrpHashTable are not inside exported functions and they called too deeply from nearest export:
  • LdrpResolveDllName
  • LdrpFindLoadedDllByName
  • LdrpInsertDataTableEntry
so ordinary code-flow graph analysis is very difficult. But actually there is more easy way to find address of LdrpHashTable

воскресенье, 4 августа 2013 г.

Inside the Microsoft Build Engine

it seems that book contains huge amount of misprints. for example on page 79:
The syntax when accessing a static property would be as follows:
$({ClassName}::{PropertyName})
o`k, lets check sample of using static properties:
<Message Text="DataTime.Now: $([System.DateTime]::Now)"/>
and below in PropertyFunctions02.proj was used GetPathToSystemFile('msbuild.exe') but output shows path to mspaint.exe

пятница, 26 июля 2013 г.

wincheck rc8.48

Download mirror
Changelog:
  • add some support of windows server 2012 r2
  • fixed logic for addresses extracting from windows 8.1 preview win32k.sys
  • fixed opening of protected processes on windows 8.1 preview
  • add checking of dxgi!g_pDebugPrivate & dxgi!g_pDXGIMessage
  • some other bugs were fixed 

среда, 17 июля 2013 г.

updated perl binding for IDA Pro

I add functions for accessing cmd structure
Now you can do things like this:
#!perl -w
use strict;
use warnings;
use IDA;

my $addr = ScreenEA();
my $href = ua_ana($addr);
my $str = GetDisasm($addr);
if ( defined($href) )
{
  my $iter;
  printf("real: %s, %s:\n", $str, get_mnem);
  foreach $iter ( keys %$href )
  {
    printf("%s: %X\n", $iter, $href->{$iter});
  }
  my $op_idx;
  for ( $op_idx = 0; $op_idx < 6; $op_idx++ )
  {
    my $op = get_op($op_idx);
    last if ( !defined $op );
    printf("operand %d:\n", $op_idx);
    foreach $iter ( keys %$op )
    {
      printf(" %s ", $iter);
      print $op->{$iter} . "\n";
    }
  }
}

среда, 10 июля 2013 г.

wincheck rc8.47

Download mirror
Changelog:
  • interrupts dumping now works on w8.1 preview 32bit
  • fixed NDIS interfaces under w8.1 preview
  • fixed registry notifiers for w8.1 preview 64bit
  • modules loaded by wdfldr now shown under w8.1 preview
  • fixed WMI regentries for w8.1 preview 64bit
  • add dumping handlers registsred with KdRegisterPowerHandler