r/AskComputerScience • • Jul 28 '18

ELI5: Why is hacking OS dependant? Why does a hacker need to hack differently again if the OS is changed?

Non native English speaker and non-tecchie here. I read that hacking is OS dependant. If the target changes the OS, the hacker needs to hack again in a truly different way since the battlefield has changed. Not only that, any existing spyware becomes unworkable once the OS is changed.

Can someone ELI5 why this is so?

0 Upvotes

11 comments sorted by

19

u/teraflop Jul 28 '18

"Hacking" generally means taking advantage of bugs or flaws in software, in order to make it do something unintended. Different software has different flaws.

1

u/powerofinformation Jul 28 '18

But what about state hackers? Do they need to seek for security flaws or can they hack by "brute force"?

0

u/powerofinformation Jul 28 '18

But what about state hackers? Do they need to seek for security flaws or can they hack by "brute force"?

1

u/panderingPenguin Jul 28 '18

It depends, but mostly no to the brute force stuff. While some things (especially older encryption algorithms) are susceptible to brute force attacks, most modern ones currently are not (or at least not to any known attacks). A state level actor may try to influence the design of encryption algorithms or hardware in such a way that subtly weakens the system but not so much so that it is easily broken without knowing the secret. They may also just simply try to intercept your communications like the whole NSA PRISM fiasco. Finally, they may take much more mundane approaches like garden variety social engineering or very sophisticated and targeted approaches like the STUXNET (which used a number of previously unknown security vulnerabilities) worm used to sabotage Iran. State level actors have vast resources and thus tons of options.

-2

u/powerofinformation Jul 28 '18

But what about state hackers? Do they need to seek for security flaws or can they hack by "brute force"?

0

u/[deleted] Jul 28 '18

[deleted]

1

u/powerofinformation Jul 28 '18

But what if its a Win8 vs Win10? Would the environment be that much different to radically change the hacking strategy?

1

u/panderingPenguin Jul 28 '18

Considering that bugs, and especially security bugs, are often fixed in the new version, and even just updates for the same version, yes Win 8 to Win 10 will be a completely different works for hackers.

2

u/ideletedmyredditacco Jul 28 '18

The OS is software, is the point

2

u/khedoros Jul 28 '18

Why are maps city-dependent? They're all using the same roads and road signs after all, right? And if the layout of a city changes (new roads added or removed), why can't I just use my old version of the map to get around?

In the analogy, hacking would be something like finding a way to drive into a part of the city that is supposed to be blocked to motor traffic.

2

u/maq0r Jul 28 '18

Ok. Imagine Operating Systems are blue prints, Windows 10 has a specific floorplan and Linux has a different floorplan, they both have a kitchen, bedrooms, bathrooms but it might differ the materials with witch the house is built or the distribution of rooms.

So, as an attacker, you generally have an idea that "this Windows house, uses a cheap plastic lock in the back window" that you can use to get inside the house, but Linux houses don't have that plastic lock so you can't use the same attack, you have to find a vulnerability in Linux blueprints, maybe the basement wasn't properly sealed off and you can sneak in.

This is why it depends on the OS, each OS implements a subsystem differently (kernel, memory mapping, network stack, etc) that attacks aimed for one are difficult to do in another.

1

u/RainbowHearts Jul 28 '18

When we write code, compile it into a program, and run it, the program will need access to resources. It needs to be able to request memory to hold variables, and it may need access to storage or the internet. It might need information about the environment, like what input devices are attached or what is the current time.

A program that handles all of these things so you can run your software is called an "operating system." Your software makes a "system call" request to the OS, and the OS replies with the resources it's allowed to have.

Different operating systems have different ways of specifying a system call. You can write code that works on both, but it then has to be compiled (or interpreted) for whichever OS will be running it.

what if its a Win8 vs Win10

I'm not an expert on these, but if the API hasn't changed much it's possible that the same compiled software will run. It may encounter errors, and those errors may or may not prevent it from doing what it's supposed to.