How do kernels stop programs from executing high privelige/potentially malicious instructions

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,404
Country
United Kingdom
If you want to look specifically at the x86 family then have a look at the concept called rings. You might have met it before when people speak of a ring 0 rootkit.

Otherwise yeah would be here all day discussing security.

Edit. Another thing that might be worth looking at.
I recall linking a talk from possibly Defcon or Blackhat (one of the big US security/hacker conferences anyway) detailing return oriented programming, however part of the run up to that was going through the previous measures that ultimately led to ROP becoming a thing. DEP and how it failed, ASLR and how it failed and so on. I can't recall specifically which talk and ROP is a fairly hot topic among hackers which is unfortunate if you go searching but it might be worth looking for.
 
Last edited by FAST6191,
  • Like
Reactions: StackMasher

Futurdreamz

Well-Known Member
Member
Joined
Jun 15, 2014
Messages
2,276
Trophies
1
Age
32
XP
2,129
Country
Canada
What kind of Kernel are we talking about? There are very many different types, with their own practices. Some outsource everything to subcomponents with limited access, some require all executable code to be cryptographically signed before they will be executed, and some use use an obscure and unpopular OS so nobody will want to hack it.
 

gudenau

Largely ignored
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,493
Country
United States
The way that it is handled is multiple CPU modes of operation, normally "supervisor" and "user".

The CPU processes instructions differently when in the different modes, the lower the privilege level the less instructions can be executed. When the CPU attempts to execute an instruction that the current privilege mode does not have access to it throws an exception that an upper layer catches. This upper layer is normally the kernel, but can be other things depending on virtualization extensions and other low level details. From there whatever handles the exception will either terminate the process that executed it, crash or make the process think that it worked.

It varies from architecture to architecture, but that is basically how it works.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    Did he ask to see yo feet?
  • K3Nv2 @ K3Nv2:
    Teeth
  • K3Nv2 @ K3Nv2:
    Juan's second cousin obsessed with teeth
    +1
  • BigOnYa @ BigOnYa:
    Did you wake up with your belt un-buckled?
  • K3Nv2 @ K3Nv2:
    Let me lift you up in my chair
  • BigOnYa @ BigOnYa:
    Down there, teeth removal is putting you behind an angry donkey.
  • K3Nv2 @ K3Nv2:
    Teeth removal is tying the donkeys hair to the tooth and slapping it's ass
    +1
  • K3Nv2 @ K3Nv2:
    The cleaning stuff they used was actually nice tasted like frosting
  • BigOnYa @ BigOnYa:
    That'd be 2million pesos, drink this tequila for your pain.
  • K3Nv2 @ K3Nv2:
    Also buy my art senior don't forget what happened with Germany
    +1
  • BigOnYa @ BigOnYa:
    For reference, so everyone knows we are not racist, just like to pick on Juan, and he gives it back to us 'murdicans in return. I love me some latinos.
    +1
  • Morganna @ Morganna:
    hello? anyone alive here?
    +1
  • Sicklyboy @ Sicklyboy:
    I'm dead inside
  • Morganna @ Morganna:
    at least you can chat :)
  • Morganna @ Morganna:
    i dont want to sound silly, but im kind of lost, im new to this community and i have a lot of question and idk where to start
  • realtimesave @ realtimesave:
    I watched baby yoda eat frog eggs on mandalorian last night
  • BigOnYa @ BigOnYa:
    @Morganna Welcome to the temp! what are your questions?
    +1
  • Sicklyboy @ Sicklyboy:
    It is nice and loud and thunder and lightning stormy outside, love it
    +1
  • Sicklyboy @ Sicklyboy:
    Can't wait for the inevitable power outage where it's initially funny because I have half of my apartment on UPSes, then I realize I have literal minutes to start shutting down all of my servers.
  • BigOnYa @ BigOnYa:
    You must be north of me, Im in Ohio.. It been storming on off all day here, coming from the north
  • Sicklyboy @ Sicklyboy:
    just barely maybe, more so just dead east.
    I'm in NJ
    +1
  • BigOnYa @ BigOnYa:
    Is weird looking at the radar, it is making a circle
  • Morganna @ Morganna:
    @BigOnYa well, starting with, idk which emulator should i use for switch, i got a gtx 1650, do you know which one would it better for my pc?
  • BigOnYa @ BigOnYa:
    The switch emulators on pc rely on your CPU mostly, and they only use a single core, so GPU not as important as a good CPU. I don't use switch emulator, but many here do, and willing to help.
  • BigOnYa @ BigOnYa:
    @K3Nv2 do you want to chime in, don't you use yuzu or ryujinx? Which do you prefer?
    BigOnYa @ BigOnYa: @K3Nv2 do you want to chime in, don't you use yuzu or ryujinx? Which do you prefer?