Sign in to follow this  
Followers 0
BinaryBrother

FreeVPN Spyware

1 post in this topic

#1 ·  Posted (edited)

Description:

FreeVPN is a Free VPN service that allows you to select from roughly 10 different servers located around the world. I Love the Service and use it regularly for various reasons... Only it comes with a little "spyware" like junk... It changes the IE and FF start-page to sponsored junk from FreeVPN which is NOT enforced by the TOS nor mentioned. So I plan on making a "Loader" for it that will reverse the changes made by FreeVPN instantly, or possibly "block" the changes. Is it possible to restrict access to the Registry and FireFox's profile DIR from only FreeVPN.exe? I have no problem with the in-page ads, which are enforced by the TOS I believe, so removing the ad-injection is not my goal.

Summery:

Stop FreeVPN.exe from changing IE and FF homepage.

Results on my primitive trials:

I'm not sure why, but this code rapidly increases in memory usage until AutoIt gives an error about allocating memory... I can't help but to think FreeVPN is retaliating some how...

Code:

#NoTrayIcon
_ConfigLoader()

;FF Variables
$ProfilePath = IniRead(@AppDataDir & "\Mozilla\Firefox\profiles.ini","Profile0", "Path", "")
$ProfilePath = StringRegExpReplace($ProfilePath,"/", "\\")
$ProfilePath = @AppDataDir & "\Mozilla\FireFox\" & $ProfilePath & "\prefs.js"
;

;FreeVPN and Settings Variables
$FreeVPN_EXE = @ProgramFilesDir & "\FreeVPN\FreeVPN.exe"
$IE_HomeKey = "HKCU\Software\Microsoft\Internet Explorer\Main"
$IE_HomeValueName = "Start Page"
$IE_HomePage = "http://www.Google.com"
$IE_BadHomePage = "http://shop.thefreevpn.com/home.php"
;

If Not FileExists($FreeVPN_EXE) Then
    MsgBox(16, "Warning", "FreeVPN was not installed to the default directory." & @CRLF & "Please find FreeVPN.exe")
    $FreeVPN_EXE = FileOpenDialog("Find FreeVPN.exe", @ProgramFilesDir, "EXE (*.exe)", 1, "FreeVPN.exe")
EndIf

$PID = Run($FreeVPN_EXE)
ProcessWait($PID)
While ProcessExists($PID)
    $HomePage = RegRead($IE_HomeKey,$IE_HomeValueName)
    If $HomePage = $IE_BadHomePage Then
        RegWrite($IE_HomeKey,$IE_HomeValueName, "REG_SZ",$IE_HomePage)
    EndIf
    _FixFF()
    Sleep(3000)
WEnd

Func _FixFF()
    $Profile = FileRead($ProfilePath)
    If StringInStr($Profile, 'user_pref("browser.startup.homepage", "http://shop.thefreevpn.com/home.php");') Then
        $FixedProfile = StringReplace($Profile, 'user_pref("browser.startup.homepage", "http://shop.thefreevpn.com/home.php");', 'user_pref("browser.startup.homepage", "http://www.google.com");')
        FileWrite($ProfilePath, $FixedProfile)
    EndIf
EndFunc


Func _ConfigLoader()
    If FileExists(@ProgramFilesDir & "\FreeVPN\Loader.exe") Then
        Return
    Else
        If MsgBox(4,"Warning","FreeBuster hasn't been configured." & @CRLF & "Configure FreeBuster now?") = 6 Then
            FileDelete(@DesktopCommonDir & "\FreeVPN.lnk")
            FileCreateShortcut(FileGetShortName(@ProgramFilesDir & "\FreeVPN\Loader.exe"), FileGetShortName(@DesktopCommonDir & "\FreeVPN.lnk"),"","","",@ProgramFilesDir & "\FreeVPN\FreeVPN.exe")
            _SelfMove(3)
            Exit
        EndIf
    EndIf
EndFunc


Func _SelfMove($iDelay = 1)
    Local $sCmdFile
    FileDelete(@TempDir & "\scratch.bat")
    $sCmdFile = 'ping -n ' & $iDelay & ' 127.0.0.1 > nul' & @CRLF _
            & 'move /Y "' & FileGetShortName(@ScriptFullPath) & '" "' & @ProgramFilesDir & '\FreeVPN\Loader.exe"' & @CRLF _
            & 'start "" "' & @ProgramFilesDir & '\FreeVPN\Loader.exe"'
    FileWrite(@TempDir & "\scratch.bat", $sCmdFile)
    Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE)
EndFunc

More Thoughts:

The above is a terrible way of attempting my goal. I would much rather block access to the registry and FireFox from FreeVPN.exe.

Edited by BinaryBrother

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0