I wish I was smart enough for the article. 8 years of web dev doesn't make the cut unfortunately.
It's just domain knowledge and terminology. "Packet sockets" is shorthand for the AF_PACKET type sockets in Linux that let you construct network packets from the ground up, including the ethernet header, if you so wish. 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"…
Exploiting the Linux kernel via packet sockets
11–20 of 41 posts
Re: Exploiting the Linux kernel via packet sockets
#12This 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?
Re: Exploiting the Linux kernel via packet sockets
#13Earlier quoted context omitted.
It's just domain knowledge and terminology. "Packet sockets" is shorthand for the AF_PACKET type sockets in Linux that let you construct network packets from the ground up, including the ethernet header, if you so wish. 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"…
The concept I think I can still get my head around. It's all the stuff that surrounds it that eludes me. I have done some work in C but that C is unlike any of the C I wrote in college (duh, it's the kernel code)
if (a >= b && (int)(c - MACRO(d)) 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.
Re: Exploiting the Linux kernel via packet sockets
#14On 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.
Re: Exploiting the Linux kernel via packet sockets
#15I wish I was smart enough for the article. 8 years of web dev doesn't make the cut unfortunately.
yeah webapps in general are the most simple aspect of programming that you can get paid to do. Not knocking it though
off-topic, btw, I read tpacket == tptacek. He can easily hide in Linux kernel. No one noticed, until now.
Re: Exploiting the Linux kernel via packet sockets
#16Someone correct me if I'm wrong: 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?
Re: Exploiting the Linux kernel via packet sockets
#17Re: Exploiting the Linux kernel via packet sockets
#18Bottom line - locally exploitable vulnerability in the linux kernel, in case you have the CAP_NET_RAW capability which never really happens. Not a real security threat for your standard linux distro. 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…
Create a new user namespace and you have CAP_NET_RAW within your shiny new namespace.
Re: Exploiting the Linux kernel via packet sockets
#19Bottom line - locally exploitable vulnerability in the linux kernel, in case you have the CAP_NET_RAW capability which never really happens. Not a real security threat for your standard linux distro. 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…
No. Create a new user namespace and you have CAP_NET_RAW within your shiny new namespace.
Re: Exploiting the Linux kernel via packet sockets
#20Earlier quoted context omitted.
No. Create a new user namespace and you have CAP_NET_RAW within your shiny new namespace.
That's pretty interesting. Does it mean it allows escaping Docker containers if you compromise a service ran as root in it?