C# // .NET General discussions about C# and .Net

InterN0T Affiliates:
EvilZonepy1337

SirCapsAlot.NET

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 23rd December 2009, 03:48
Tsukasa's Avatar
-=Ninja Pirate=-
 
Join Date: Jun 2008
Location: ::1
Posts: 491
Rep Power: 14
Reputation: 319
Tsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the dark
AntiLW

So one of my IT jobs is at a rental company and most the machines that I have to keep cleaning / re-imaging is due to dumb people using limewire. Soo since it annoys me I made this to annoy them back.

Yes this ez to remove but most of them can't and the smart ones that can aren't the ones I have to keep fixing

Installer runas admin
Code:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.IO;
using Microsoft.Win32;

namespace AntiLW
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Please Wait Installing AntiLW");
            CheckInstall();
            Console.WriteLine("Install Complete");
            Console.WriteLine("Press any key to exit...");
            Console.ReadLine();
            return;
        }

        static void InstallStart()
        {
            Console.WriteLine("Setting up Startup Registry");
            RegistryKey RK = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run\", true);
            RK.SetValue("NetworkManger", @"C:\Windows\System\NetworkManager.exe");
            RK.Close();
        }

        static void CheckInstall()
        {
            var FullFilePath = new FileInfo(@"c:\Windows\system32\NetworkManager.exe");

            if (FullFilePath.Exists == false)
            {
                string FileName = "NetworkManager.exe";
                string SourcePath = Directory.GetCurrentDirectory();
                string DestPath = @"C:\Windows\System";
                string SourceFile = Path.Combine(SourcePath, FileName);
                string DestFile = Path.Combine(DestPath, FileName);
                Console.WriteLine(@"Installing AntiLW as NetworkManager into windows\system");
                File.Copy(SourceFile, DestFile, true);
                InstallStart();
            }
        }
    }
}
NetworkManager.exe
Code:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.IO;
using System.Windows.Forms;

namespace AntiLW
{
    class Program
    {
        static void Main(string[] args)
        {
            WaitLoop();
        }

        static void WaitLoop()
        {
            DateTime start = DateTime.Now;
            while (DateTime.Now.Subtract(start).Minutes < 1)
            {
                //Helps stop use from jacking the cpu.
                Application.DoEvents();
                System.Threading.Thread.Sleep(1);
            }
            CheckPL("Limewire");
            CheckPL("LimeWire");
            WaitLoop();
        }

        static bool CheckPL(string name)
        {
            foreach (Process PList in Process.GetProcesses())
            {
                if (PList.ProcessName.StartsWith(name))
                {
                    PList.Kill();
                    MessageBox.Show("LimeWire was found running and has been ShutDown\n LimeWire usage is usually illegal and most virus/malware issues\n are usually caused from this program.\n If you have legal reasons to use this program, Contact YOU-COMPANY-NAME to have this block removed", "LimeWire Found Running");
                }
            }
        }
    }
}
__________________
"...a computer is a stupid machine with the ability to do incredibly
smart things, while computer programmers are smart people with the
ability to do incredibly stupid things. They are, in short, a perfect
match".
Reply With Quote
  #2  
Old 23rd December 2009, 13:42
MaXe's Avatar
Studying shellcode..
 
Join Date: Jun 2008
Location: Sweden - Ljusdal
Posts: 3,433
Blog Entries: 36
Rep Power: 10
Reputation: 204
MaXe has made his way up the systemMaXe has made his way up the systemMaXe has made his way up the system
Re: AntiLW

Haha I like this very much Tsukasa, +Rep! :-)

This is definitely something One can use to protect against "stupid users" on
an IT- / LAN-network (or whatever network is in use where you have control
of the software that is running on the PC's).

The code is also very simple and clean and easy to develope further on to
include many more processes so that's also why I like it quite much. Good job :-)
__________________

Quote:
Originally Posted by Norph
MaXe, I really doubt that you are able to browse ANY site more than 2 minutes before you start pwning it xD
Reply With Quote
  #3  
Old 23rd December 2009, 15:26
Tsukasa's Avatar
-=Ninja Pirate=-
 
Join Date: Jun 2008
Location: ::1
Posts: 491
Rep Power: 14
Reputation: 319
Tsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the dark
Re: AntiLW

Ya you can add as many as you want to look for. It can also be hidden from task manager ..etc made to delete the dir's that the programs are installed in and so on.

the static bool CheckPL was cuz I had another method is was passing ture/false for so it can me changed.
__________________
"...a computer is a stupid machine with the ability to do incredibly
smart things, while computer programmers are smart people with the
ability to do incredibly stupid things. They are, in short, a perfect
match".

Last edited by Tsukasa; 23rd December 2009 at 15:31.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



All times are GMT +2. The time now is 10:57.
Copyright ©2007 - Forever, InterN0T & Teh Unkwon

Hosted by 1and1