Exploiting the Linux kernel via packet sockets
googleprojectzero.blogspot.com
googleprojectzero.blogspot.com
On the other hand, this is a great technical write-up that describes thoroughly the internals of some of the linux kernel subsystems. Probably the best documentation you can find for some subsystems. Also shows how they bypassed exploit mitigations technics such as KASLR, SMAP&SMEP.
Create a new user namespace and you have CAP_NET_RAW within your shiny new namespace.
Otherwise no one could ping from a container.
These containers are a light way to separate processes. They are not intended as a security measure to isolate malicious processes that tries to escape.
Archlinux has user namespaces disabled, docker does not use them by default and does not allow them inside containers by default, on Ubuntu I make sure to disable kernel.unprivileged_userns_clone on all the servers I deploy to, etc.
[1] http://web.mit.edu/adorai/www/seuss-technical-writing.html
This is a locally exploitable privilege escalation involving creation of the socket, triggerable from user level, so exploitable by local users or as a followup after another exploit is used to get some level of local access, correct?
That's as opposed to a regular socket, which is higher level and restricts you to a much smaller subset of things you can change/set.
The article just shows how they uncovered an exploit by "fuzzing" input to packet sockets. Where "fuzzing" just means using a tool that creates random inputs/values.
if (a >= b && (int)(c - MACRO(d)) <= 0) goto out;
Or the stuff further down? Just confusing because tpacket_req and friends are defined as structs elsewhere, so you don't have that context. And it's not really C, it's syzkaller (fuzzing tool) descriptions, kind of a pseudo code syntax.
off-topic, btw, I read tpacket == tptacek. He can easily hide in Linux kernel. No one noticed, until now.
I believe that the serial device /dev/ttyS0 was named in honor of Theodore Ts'o. So maybe tpacket could be at least retroactively declared to honor tptacek.
Your task is to make a button that's currently green and make it blue instead. What's the right file(s) to edit? How many layers of caching do you need to disable to see that your change actually worked? Do you need to restart anything after the change for it to be seen?
The current green color could be:
- in a css file, but one that has to go through SAAS/LESS first, or maybe not. Or maybe there's more than one entry, depending on @media screen resolution? Or maybe it's not a file at all...the css "file" is generated on the fly by some server-side framework.
- in an html file, but in <style> tags. Or maybe dynamically generated style tags via client side javascript. Or maybe server-side dynamically generated style tags? Or maybe not style tags at all? Perhaps a style attribute on the button.
- Or hey, that looks like a button, but it's not a button at all. It's an <a> tag with button styling. And it's green, but only because of a background image. Which is loaded how (static css? dynamic js style manipulation? inline <img> tag in the <a>? something else?)
You sir win the Internet for today.
Besides a much steeper learning curve to C, it is much easier. If you put the GPIO pull-up to high, the LED turns on. If you put it to low, the LED turns off. It is much simpler in that there isn't much abstraction really at all.
(source: am kernel/firmware programmer)
Instead of spending ~100 for a MyQ smart garage opener I spent less than 20 for an Adafruit Huzzah and some sensors. Then I taught myself to program it and boom. It isn't hard if you're dedicated and have a project to learn with a clear bend goal.
This does not make webapps necessarily simple: complex UI logic, asynchronous everything often constant two-way communication with a server, maybe with conflict resolution, etc.