7373 "10.0.15063.0" :"Win10x86_15063" ,
7474 "10.0.15063.608" :"Win10x64_15063" ,
7575 "10.0.16299.15" :"Win10x86_16299" ,
76+ "10.0.16299.492" : "Win10x86_16299" ,
7677 "10.0.10240.17770" :"Win10x86_10240_17770" ,
7778 "10.0.17134.1" :"Win10x86_17134" ,
7879 "10.0.17763.0" :"Win10x86_17763" ,
105106 "10.0.15063.608" :"Win10x64_15063" ,
106107 "10.0.14393.479" :"Win10x64_14393" ,
107108 "10.0.16299.0" :"Win10x64_16299" ,
109+ "10.0.16299.492" : "Win10x64_16299" ,
108110 "10.0.10240.17770" :"Win10x64_10240_17770" ,
109111 "10.0.17134.1" :"Win10x64_17134" ,
110112 "10.0.17763.0" :"Win10x64_17763" ,
@@ -303,7 +305,7 @@ def parse_yarascan_data(data, out, output = "text"):
303305 ]))
304306 out .write ("\n \n " )
305307 else :
306- out .write ("{0},{1},{2},{3}\n " .format ("Rule" , "Owner" , "Address" , "Data" ))
308+ out .write ("{0},{1},{2},{3}\n " ) .format ("Rule" , "Owner" , "Address" , "Data" ))
307309 for rule , owner , addr , content in datas :
308310 out .write ("{0},{1},{2},{3}\n " .format (rule , owner , addr , content ))
309311 out .write ("\n \n " )
@@ -336,8 +338,7 @@ def parse_malfind_data(data, out, output = "text"):
336338 ])))
337339 out .write ("\n \n " )
338340 else :
339- out .write ("{},{},{},{},{},{},{}\n " ).format (
340- "Process" , "Pid" , "Address" , "VadTag" , "Protection" , "Flags" , "Data" )
341+ out .write ("{},{},{},{},{},{},{}\n " .format ("Process" , "Pid" , "Address" , "VadTag" , "Protection" , "Flags" , "Data" ))
341342 for proc , pid , address , vadtag , protection , flags , data in datas :
342343 out .write ("{},{},{},{},{},{},{}\n " .format (proc , pid , address , vadtag , protection , flags , data ))
343344 out .write ("\n \n " )
@@ -470,10 +471,10 @@ def main():
470471 profile = "Win10x64_18362"
471472 version = get_version_number ("ntdll.dll" )
472473 if platform .machine () == "AMD64" :
473- driver = "winpmem_x64 .sys"
474+ driver = "att_winpmem_64 .sys"
474475 profile = WindowsVersionsX64 .get (version , "UNKNOWN" )
475476 else :
476- driver = "winpmem_x86 .sys"
477+ driver = "att_winpmem_32 .sys"
477478 profile = WindowsVersionsX86 .get (version , "UNKNOWN" )
478479 if profile == "UNKNOWN" :
479480 profile = first_try_brute_force (debugg , version )
@@ -483,7 +484,10 @@ def main():
483484 if profile not in profs :
484485 if debugg :
485486 print "Incorrect profile found: {0}, version: {1}" .format (profile , version )
486- profile = "Win10x64_18362"
487+ if platform .machine () == "AMD64" :
488+ profile = "Win10x64_18362"
489+ else :
490+ profile = "Win10x86_18362"
487491 if debugg :
488492 print "Trying profile" , profile
489493 if debugg :
@@ -495,14 +499,25 @@ def main():
495499 sys .exit (- 1 )
496500
497501 pmem_service = Service (driver = driver , service = service_name , debug = debugg )
498-
499-
500502 if not service_running (service_name ):
501503 setup (driver , service_name , pmem_service , debugg )
502504 try :
503- pmem_service .start ()
505+ ret_code = pmem_service .start ()
506+ if ret_code == - 1 :
507+ if platform .machine () == "AMD64" :
508+ driver = "winpmem_64.sys"
509+ else :
510+ driver = "winpmem_32.sys"
511+ driver = resource_path (driver )
512+ if not service_name or not os .access (driver , os .R_OK ):
513+ out .write ("Make sure the driver is in place: {0}" .format (driver ))
514+ sys .exit (- 1 )
515+ pmem_service = Service (driver = driver , service = service_name , debug = debugg )
516+ if not service_running (service_name ):
517+ setup (driver , service_name , pmem_service , debugg )
518+ pmem_service .start ()
504519 except :
505- print "Unable to start winpmem service"
520+ out . write ( "Unable to start winpmem service\n " )
506521 out .close ()
507522 return
508523
0 commit comments