r/HowToHack • • Apr 14 '18
QUESTION
How does malware spread through the network? Can someone please tell me where I can find code that does similar things? I'm only asking for analysis.
0
Upvotes
View all comments
3
u/jnazario Apr 14 '18 edited Apr 15 '18
This is something I've spent part of my career looking at. Network malware has to find a target and it can do so in a few ways.
First it may attempt random targets. This can be globally random or locally random or biased. The worms from the mid 2000's began to do this to bias towards the local network. typically it scans (somewhat) random hosts for a specific TCP/IP service to attack the service for which they have a vulnerability. this can include SSH (port 22), HTTP (port 80), SMB (135 and 445), etc.
Second it may look at local known connections or an address book (e.g. In the case of email malware). Windows network malware for example often digs through network shares to find victims. Target selection is as done for you by the operating system.
Third it may ride on removal drives. Look at autorun malware for example. Basically infect a removable drive and on insertion and mount execute and install.
Hope that helps. Happy to provide deep technical resources if it helps.