Known-exploit detection for the kernel
Known-exploit detection for the kernel
Posted Dec 19, 2013 16:25 UTC (Thu) by tshow (subscriber, #6411)Parent article: Known-exploit detection for the kernel
if(user is nonlocal)
{
log them out & lock the account
add their IP to the ban list
send the admin a "user tried exploit" message
}
I could see that being useful. Obviously there's potential pitfalls (people boobytrapping each other, or managing to get daemons kickbanned if the system isn't smart enough), but a tripwire hooked to a nuke can be a useful line in a layered defense.
Posted Dec 19, 2013 18:09 UTC (Thu)
by RobSeace (subscriber, #4435)
[Link] (5 responses)
Posted Dec 19, 2013 20:35 UTC (Thu)
by tshow (subscriber, #6411)
[Link] (4 responses)
Posted Dec 19, 2013 20:45 UTC (Thu)
by dlang (guest, #313)
[Link] (3 responses)
In addition, I'm not sure this is something you want to jump on every time (that the reason for rate limiting the alerts), you may just get flooded with alerts.
Posted Dec 20, 2013 16:21 UTC (Fri)
by tshow (subscriber, #6411)
[Link] (2 responses)
If someone is script kiddying their way through a series of exploits to see what sticks, I want the userspace daemon to be able to log them out and ban their IP (and possibly lock their account) *now*, this microsecond, before they get a chance to try the next one. Yes, that does imply potential scheduling hackery to get the data out the exploit alert pipe to the userspace daemon before control is allowed to return to the offending process.
In theory you'd only get flooded with alerts if the system was flooded with exploit attempts. You'd probably want to know if that was happening, but rate limiting could be done in the userspace daemon.
I think you'd want to be able to differentiate between local and remote exploits; if someone logged in is trying an exploit it's a very different kettle of fish from someone trying a remote exploit against the external interface.
Feeding the userspace daemon through syslog is kind of silly; a dedicated pipe the daemon could connect to would be better. Avoiding syslog as a transport means:
- being able to specify a consistent communication protocol
Posted Dec 20, 2013 18:47 UTC (Fri)
by dlang (guest, #313)
[Link]
There are a whole lot more tools available to do the alerting based on syslog message than there are going to be if you invent a new protocol.
> If someone is script kiddying their way through a series of exploits to see what sticks, I want the userspace daemon to be able to log them out and ban their IP (and possibly lock their account) *now*, this microsecond, before they get a chance to try the next one. Yes, that does imply potential scheduling hackery to get the data out the exploit alert pipe to the userspace daemon before control is allowed to return to the offending process.
This requires much more significant changes, and really is going to require that you put your response code into the kernel inside the detection routine.
> In theory you'd only get flooded with alerts if the system was flooded with exploit attempts. You'd probably want to know if that was happening, but rate limiting could be done in the userspace daemon.
given that the effort involved in generating the log compared to the action that triggers the log, not having this be rate limited would result in a very good DOS vector.
> Feeding the userspace daemon through syslog is kind of silly; a dedicated pipe the daemon could connect to would be better. Avoiding syslog as a transport means:
> - being able to specify a consistent communication protocol
why can't you use a consistent protocol in your syslog message?
> - possibly being able to avoid parsing entirely, but at the least the protocol can be designed to make the parsing trivial
you can make the parsing trivial in syslog as well
> - not needing to worry about some other syslog output source being tricked into spoofing valid-looking but manufactured exploit logs
you can do this inside syslog with filters today (only send to this output if the source is the kernel and the message contains blah)
> - the daemon being able to sleep on data availability in the pipe rather than having to constantly chew on syslog and spit out the (1 - epsilon) it doesn't need, so the daemon will mostly just be asleep until its needed
again, with filtering in syslog, your userspace daemon can do this today.
And as I noted up at the top, there are a lot more alerting engines around that understand syslog than ones that will understand your new protocol.
Any significant company is already going to have an alerting tool in place, it's far better to integrate with that than to require a new tool be written.
Posted Dec 29, 2013 8:06 UTC (Sun)
by lamawithonel (subscriber, #86149)
[Link]
Posted Dec 25, 2013 23:03 UTC (Wed)
by nix (subscriber, #2304)
[Link] (4 responses)
Posted Jan 6, 2014 3:03 UTC (Mon)
by speedster1 (guest, #8143)
[Link] (3 responses)
There shouldn't be much DoS potential for script kiddies to abuse if there were a reliable mechanism for automatic account-locking like tshow wanted.
On the other hand, count me among those who predict this feature will quickly become worked-around by all the popular exploit kits -- at least on any systems lacking admins who are big enough on security to be running custom kernels with generic uname info. Those admins who do tweak their uname and hide /boot /lib/modules are probably not the ones who the kernel devs need to worry about protecting from script kiddies (their custom kernels probably include grsecurity...)
Posted Jan 6, 2014 13:22 UTC (Mon)
by nix (subscriber, #2304)
[Link] (2 responses)
Posted Jan 7, 2014 2:59 UTC (Tue)
by speedster1 (guest, #8143)
[Link] (1 responses)
Posted Jan 8, 2014 16:38 UTC (Wed)
by nix (subscriber, #2304)
[Link]
The right thing to do in that situation is probably to halt mail delivery and just queue everything -- but your proposal would lock the entire account. An attacker that can determine what accounts exist (perhaps via said exploit) could then DoS-attack the entire system trivially.
(But, of course, if they can execute arbitrary code as one user they can probably do that anyway, in about a million ways, and probably get root too. So perhaps my concerns are unjustified. It might well elevate a failed breakin, via an exploit that doesn't actually work, to a partial DoS, but I'm finding it hard to be too worried about that.)
Known-exploit detection for the kernel
Known-exploit detection for the kernel
Known-exploit detection for the kernel
Known-exploit detection for the kernel
- possibly being able to avoid parsing entirely, but at the least the protocol can be designed to make the parsing trivial
- not needing to worry about some other syslog output source being tricked into spoofing valid-looking but manufactured exploit logs
- the daemon being able to sleep on data availability in the pipe rather than having to constantly chew on syslog and spit out the (1 - epsilon) it doesn't need, so the daemon will mostly just be asleep until its needed
Known-exploit detection for the kernel
this patch set uses the audit framework without any rate limiting, and in the somewhat more structured audit format. that sounds like what you want.
Known-exploit detection for the kernel
+ audit_log_format(ab, "exploit id=%s pid=%u uid=%u auid=%u ses=%u comm=",
+ id, pid, uid,
+ from_kuid(&init_user_ns, audit_get_loginuid(task)),
+ audit_get_sessionid(task));
Known-exploit detection for the kernel
Known-exploit detection for the kernel
Known-exploit detection for the kernel
Known-exploit detection for the kernel
Known-exploit detection for the kernel