Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
TCPizza10536y@irene there are but he ignored them because the assignment was harmless, anything that uses autorun gives out a warning
-
TCPizza10536y@irene the heap is individual for each computer, if the virus doesn't distribute itself through lan it will still be harmless
-
TCPizza10536y@tacticalKimchi in C you can expand your let's say array on you heap using malloc and realloc, so you just spam them and insert nulls to the entire heap, and sonetimes it can run over other programs and if there's a windows update on startup it can even corrupt some files
-
TCPizza10536y@beegC0de usually a warning will pop up and stop the program if it tries reaching down there but on some accations it will do it because it's saved in the registry
-
TCPizza10536y@irene https://pastebin.com/qvZY7ZXQ
it's not that complicated and you have to run it as administrator
for compiling it with gcc use --windows -
pain3246y@jespersh never use a virtual maschine to test a virus. There are so many vulnerabilities discovered ever year to escape a VM it's ridiculous.
Always use a second pc not connected to the network. Best is an iso which works only in ram and is cleared after shutdown -
I'm not even sure what to say. But thanks for sharing. That story went right into my favorites.
-
Reminds me of my auto Hoffer I created as a joke on a colleague. At the company I was working for we'd set a David Hasselhoff in speedo photo on your desktop background if you left your pc without locking it. As he almost never forgot locking it I took my chance that one time he did forget. Quickly created console app that would set one of 4 embedded hasselhoff pictures on desktop at logon/unlock. Disguised it as some legit Windows process, also in auto run in registry. This was awesome. He couldn't figure out what was Hoffing him constantly, even when locking his system.
-
620hun81886yWhen I was around 10 I made a virus that simply created empty files until it was terminated. I gave it a meaningless name, and forgot about it. Then sometimes later I naively ran it to find out what that exe was. By the time I managed to kill it it made 15000 empty files on my desktop... it took me 2 hours to delete all of them 😂
-
malloc() would at some point simply return NULL, when the virtual memory manager can't allocate a new 100 byte slice.
That is not a heap corruption. 😉 It is just a monster leak on purpose. Which is evil enough, however. It will freeze the computer once all available memory is allocated. Maybe it will lead to a BSoD, too? 😈
To be a memory, corruption, your code has to try to use memory beyond the memory that was allocated, a buffer overflow, for example.
To make it a heap corruption, a function has to allocate memory on its stack, and then write over its boundaries and thus into the programs heap. 😉 -
@TCPizza just "forgetting" to add the exit condition won't do it. The program would simply crash with a recursion depth error. (too many stacks)
And when the program is gone, the virtual memory manager will eventually clean up the unclaimed pages. Even on Windows. (since Vista. XP would go haywire over that, its VMM was crap.) -
TCPizza10536y@Yamakuzure I made a recursion that checks if the answer of malloc(100) isn't null it will run again and once it is null the computer will shut down
-
The reason I suggested testing with SysRescCD is, that it runs on any hardware.
Debating which distro is the coolest can be done later.
Related Rants
-
gururaju56*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx70This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus62Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
assignment: use winAPI to create a "virus" that put itself in autorun and does nothing.
me, a curious student: does the assignment and adds a heap corruption code just as a joke.
after sending the assignment to the teacher I realized that I have sent the real virus.
result: teacher comes next lesson without a computer and stares at me silently and viciously.
we'll see what happens next
any idea on what's going on in his head?
rant
c
linux
c++
winapi
windows
assembly
architecture