Results 1 to 4 of 4
  1. #1
    NLNHack's Avatar
    Join Date
    Aug 2015
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    2

    Cool Show untraceable? Message Box (VB.NET)

    I've seen lots of RATs that have functions where you can show messages to the user using MsgBox or whatever. The problem is, you can find out what process the message box originates from through the task manager etc. I ended up finding a much better way: just use the built in windows function for sending messages on remote desktop sessions, WTSSendMessage. I originally saw this function in Process Hacker 2 and after taking a look at the source, I made my VB source (also posted it on pinvoke):

    Code:
    <DllImport("wtsapi32.dll", SetLastError:=True)>
        Private Shared Function WTSSendMessage(ByVal hServer As IntPtr, ByVal SessionId As Int32, ByVal title As String, ByVal titleLength As UInt32, ByVal message As String, ByVal messageLength As UInt32, ByVal style As UInt32, ByVal timeout As UInt32, ByRef pResponse As UInt32, ByVal bWait As Boolean) As Boolean
        End Function
        Public Shared WTS_CURRENT_SERVER_HANDLE As IntPtr = IntPtr.Zero
        Public Shared WTS_CURRENT_SESSION As Integer = -1
        Dim title As String = "MessageBox Title"
        Dim content As String = "Hello World!"
    
        ''In a Sub/Function, shows MessageBox with exclamation icon.
        WTSSendMessage(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, title, title.Length, content, content.Length, MessageBoxIcon.Exclamation, Nothing, Nothing, False)
    I haven't really tried tracing it back too much, but it seems to be a lot harder to trace back to the origins. Enjoy.

  2. The Following 2 Users Say Thank You to NLNHack For This Useful Post:

    Dongonata (12-21-2015),fwsefwsgrgwhergr (12-14-2015)

  3. #2
    fwsefwsgrgwhergr's Avatar
    Join Date
    Oct 2012
    Gender
    female
    Posts
    242
    Reputation
    10
    Thanks
    345
    My Mood
    Cold
    Thanks m8 i will need this for my updater i dont wanna my software testers to see dat

  4. #3
    Dongonata's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    529
    Reputation
    30
    Thanks
    47
    My Mood
    Brooding
    Well, that's pretty clever.

  5. #4
    hkKenshin's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Posts
    301
    Reputation
    28
    Thanks
    340
    Optionally, you can inject some simple stub code that calls MessageBoxA/MessageBoxW and then call CreateRemoteThread to execute it.
    Also hard to trace ( If you close the process handle prior to MessageBoxA() being calls ).

Similar Threads

  1. [Solved] Message Box Showing Up Twice
    By silentrunner2 in forum Visual Basic Programming
    Replies: 7
    Last Post: 02-07-2012, 11:59 AM
  2. OHK message box wont show up when loading
    By Redruhm in forum Vindictus Help
    Replies: 2
    Last Post: 12-22-2011, 08:36 AM
  3. question about message boxes
    By VvITylerIvV in forum C++/C Programming
    Replies: 5
    Last Post: 08-07-2010, 09:38 AM
  4. Message Box help
    By hopefordope in forum Visual Basic Programming
    Replies: 5
    Last Post: 02-20-2010, 02:43 PM
  5. Replies: 3
    Last Post: 03-28-2009, 11:58 PM