0

I have a problem at work where a co-worker is the system admin and he has gone LogMeIn crazy. I even tried moving all three of my computers to a different network administered by a different department and domain. He just simply unplugs network 1 cable and plugs in network 2 cable and proceeds to mess with all my settings via LogMein. I don't know the exact details as to how he is doing it but I did manage to catch a connection in the event log the captured his computer name, IP Address and port 64474. This is a huge problem!

Can anyone tell how I can listen for network 1 and accept it but if network 2 cables is connected shutdown the computer right away

The program "LogMeIn" can even connect to a computer that is unattended and become admin.

My plan is to Visual Basic 2010 32 bit on a 64 bit windows 7 computer and write a program that will store a variable in a file that will hold the desired network IP or string that will be compared to the ip that computer currently has.

The desired network uses DHCP and unwanted is an intranet using a range of fixed IP addresses (e.g. 10.20.2.0 - 10.20.2.99).

Now here is my question:

The only compiler I have available is Visual Studio 2010 32 bit. What type of data do I need to capture other than IP addresses to know a different network was plugged into? I can handle where to store the data and how to compare it.

Here is what I am starting with just the IP:

Dim HostName As String = Dns.GetHostName()
Dim thisHost As IPHostEntry = Dns.GetHostByName(HostName)
Dim thisIpAddr As String = thisHost.AddressList(0).ToString
Debug.WriteLine(thisIpAddr)

Maybe I could do it in a simple batch file drop it into startup like below but how do I handle booting without any Ethernet plugged in?

@echo off
for /f "delims=[] tokens=2" %%a in ('ping -4 -n 1 %ComputerName% ^| findstr [') do set NetworkIP=%%a
echo Network IP: %NetworkIP%

for /f %%a in ('powershell Invoke-RestMethod api.ipify.org') do set PublicIP=%%a
echo Public IP: %PublicIP%
IF %PublicIP% EQU 75.555.55.555 (
echo Its Me!
)ELSE (shutdown /f
)
4

0 回答 0