Changeset 1599
- Timestamp:
- 06/02/08 17:04:47 (3 months ago)
- Files:
-
- honeyclient/branches/exp/kindlund-strace/auto_drive.pl (added)
- honeyclient/branches/exp/kindlund-strace/bin/strace_wrapper.cmd (added)
- honeyclient/branches/exp/kindlund-strace/lib/HoneyClient/Agent.pm (modified) (2 diffs)
- honeyclient/branches/exp/kindlund-strace/manual_drive.pl (added)
- honeyclient/branches/exp/kindlund-strace/thirdparty/capture-mod/FileMonitor.exl (modified) (1 diff)
- honeyclient/branches/exp/kindlund-strace/thirdparty/capture-mod/ProcessMonitor.exl (modified) (1 diff)
- honeyclient/branches/exp/kindlund-strace/thirdparty/capture-mod/RegistryMonitor.exl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/kindlund-strace/lib/HoneyClient/Agent.pm
r1499 r1599 1401 1401 my $processName = getVar(name => "process_name", 1402 1402 namespace => $args{'driver_name'}); 1403 my $status = $job->spawn($processExec, $processName . " " . $args{'parameters'}); 1403 # TODO: Updated for initial STRACE support - Clean this up further. 1404 #my $status = $job->spawn($processExec, $processName . " " . $args{'parameters'}); 1405 my $status = $job->spawn('C:\WINDOWS\system32\cmd.exe', 'cmd.exe /C C:\cygwin\home\Administrator\src\honeyclient-trunk\bin\strace_wrapper.cmd "' . $processExec . "\" \"" . $args{'parameters'} . "\" && sleep " . ($args{'timeout'} + 10)); 1404 1406 1405 1407 # Sanity check. … … 1412 1414 $LOG->info($args{'driver_name'} . " - Driving To Resource: " . $args{'parameters'}); 1413 1415 1416 # TODO: Updated for initial STRACE support - Clean this up further. 1414 1417 # Run the job. 1415 $job->run($args{'timeout'}); 1418 #$job->run($args{'timeout'}); 1419 # TODO: Clean this up, eventually. 1420 use File::stat; 1421 my $watch_counter = 0; 1422 my $size_counter = 0; 1423 my $current_strace_size = 0; 1424 my $previous_strace_size = 0; 1425 $job->watch(sub { 1426 my $job = shift; 1427 if ($watch_counter >= $args{'timeout'}) { 1428 # TODO: Delete this, eventually. 1429 $LOG->warn("Driver Status: Timeout!"); 1430 return 1; 1431 } 1432 $watch_counter++; 1433 # TODO: Delete this, eventually. 1434 $LOG->info("Watch Counter: " . $watch_counter); 1435 1436 # TODO: Clean this up, eventually. 1437 my $stat_obj = stat("/tmp/strace.log"); 1438 if (defined($stat_obj)) { 1439 $current_strace_size = $stat_obj->size; 1440 } 1441 # TODO: Delete this, eventually. 1442 $LOG->info("STrace Log Size: " . $current_strace_size . " (bytes)"); 1443 # If the size has not changed, then increment 1444 # the size_counter; otherwise, reset the size_counter 1445 # to 0. 1446 if ($previous_strace_size == $current_strace_size) { 1447 $size_counter++; 1448 } else { 1449 $size_counter = 0; 1450 } 1451 1452 # TODO: Clean this up, eventually. 1453 if ($size_counter >= 4) { 1454 # TODO: Delete this, eventually. 1455 $LOG->info("Driver Status: Done?"); 1456 return 1; 1457 } 1458 1459 $previous_strace_size = $current_strace_size; 1460 return 0; 1461 }, 1); 1416 1462 1417 1463 # Check to see if run fails. honeyclient/branches/exp/kindlund-strace/thirdparty/capture-mod/FileMonitor.exl
r1578 r1599 334 334 + Write C:\\WINDOWS\\system32\\svchost\.exe C:\\Documents and Settings\\LocalService 335 335 + Write C:\\WINDOWS\\system32\\svchost\.exe C:\\WINDOWS\\system32\\config\\SysEvent\.Evt 336 337 #### Honeyclient - STRACE Functionality 338 + Write C:\\Program Files\\Internet Explorer\\iexplore\.exe C:\\cygwin\\tmp\\strace\.log honeyclient/branches/exp/kindlund-strace/thirdparty/capture-mod/ProcessMonitor.exl
r1522 r1599 48 48 #### HONEYCLIENT AUTO EXCLUDE SCRIPT - IE7 accessing live.com 49 49 + infocard.exe .* C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.0\\Windows Communication Foundation\\infocard.exe 50 51 #### HONEYCLIENT - Incorporating STRACE 52 + cmd.exe .* C:\\WINDOWS\\system32\\cmd.exe 53 + runelevate.exe .* C:\\Program Files\\STRACE\\runelevate.exe 54 + withdll.exe .* C:\\Program Files\\STRACE\\withdll.exe honeyclient/branches/exp/kindlund-strace/thirdparty/capture-mod/RegistryMonitor.exl
r1540 r1599 401 401 # IE7 - accessing multimedia pages 402 402 + SetValueKey C:\\Program Files\\Internet Explorer\\iexplore\.exe HKCU\\Software\\Microsoft\\MPEG2Demultiplexer 403 404 #### Honeyclient - STRACE Support 405 + SetValueKey C:\\Program Files\\STRACE\\runelevate\.exe HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap 406 + SetValueKey C:\\Program Files\\STRACE\\runelevate\.exe HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders 407 + SetValueKey C:\\Program Files\\STRACE\\runelevate\.exe HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MountPoints2.*
