- Code: Select all
system("echo NOT SANDBOXED")
See https://code.google.com/p/chromium/issu ... ?id=240905
When you google "echo NOT SANDBOXED" you will find that this issue also occurs in Steam and in Atom/Electron.
system("echo NOT SANDBOXED")
amaitland wrote:I've posted a followup message on the chrome tracker, see if anyone responds.
I still think a few more people commenting and asking politely would be helpful.
fasecero wrote:Changing TopMost again and again generates some focus issues. Thanks for the update, I had forgotten that info. Just hooked up the CreateProcess function with .net and blocking calls that contain "echo NOT sandboxed" string... it seems to work properly.
Imports System.Runtime.InteropServices
Imports EasyHook
#Region " CreateProcess hook"
Public Sub InitHook()
Dim CreateFileHook = LocalHook.Create(EasyHook.LocalHook.GetProcAddress("kernel32.dll", "CreateProcessA"), New CreateProcessDelegate(AddressOf CreateProcessHooked), Nothing)
CreateFileHook.ThreadACL.SetExclusiveACL(New Integer() {})
End Sub
Public Function CreateProcessHooked( _
lpApplicationName As String, _
lpCommandLine As String, _
ByRef lpProcessAttributes As SECURITY_ATTRIBUTES, _
ByRef lpThreadAttributes As SECURITY_ATTRIBUTES, _
bInheritHandles As Boolean, _
dwCreationFlags As UInt32, _
lpEnvironment As IntPtr, _
lpCurrentDirectory As String, _
<[In]> ByRef lpStartupInfo As STARTUPINFO, _
<[Out]> ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean
If InStr(lpCommandLine, "echo NOT SANDBOXED") Then
Return 1
End If
Return CreateProcess(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation)
End Function
<UnmanagedFunctionPointer(CallingConvention.Winapi, SetLastError:=True)> _
Public Delegate Function CreateProcessDelegate( _
lpApplicationName As String, _
lpCommandLine As String, _
ByRef lpProcessAttributes As SECURITY_ATTRIBUTES, _
ByRef lpThreadAttributes As SECURITY_ATTRIBUTES, _
bInheritHandles As Boolean, _
dwCreationFlags As UInt32, _
lpEnvironment As IntPtr, _
lpCurrentDirectory As String, _
<[In]> ByRef lpStartupInfo As STARTUPINFO, _
<[Out]> ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean
<DllImport("kernel32.dll")> _
Function CreateProcess( _
lpApplicationName As String, _
lpCommandLine As String, _
ByRef lpProcessAttributes As SECURITY_ATTRIBUTES, _
ByRef lpThreadAttributes As SECURITY_ATTRIBUTES, _
bInheritHandles As Boolean, _
dwCreationFlags As UInt32, _
lpEnvironment As IntPtr, _
lpCurrentDirectory As String, _
<[In]> ByRef lpStartupInfo As STARTUPINFO, _
<[Out]> ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean
End Function
<StructLayout(LayoutKind.Sequential)> _
Structure SECURITY_ATTRIBUTES
Public nLength As Integer
Public lpSecurityDescriptor As IntPtr
Public bInheritHandle As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
Structure STARTUPINFO
Public cb As Integer
Public lpReserved As String
Public lpDesktop As String
Public lpTitle As String
Public dwX As Integer
Public dwY As Integer
Public dwXSize As Integer
Public dwYSize As Integer
Public dwXCountChars As Integer
Public dwYCountChars As Integer
Public dwFillAttribute As Integer
Public dwFlags As Integer
Public wShowWindow As Short
Public cbReserved2 As Short
Public lpReserved2 As Integer
Public hStdInput As Integer
Public hStdOutput As Integer
Public hStdError As Integer
End Structure
Structure PROCESS_INFORMATION
Public hProcess As IntPtr
Public hThread As IntPtr
Public dwProcessId As Integer
Public dwThreadId As Integer
End Structure
#End Region
Users browsing this forum: Google [Bot] and 54 guests