2

I am trying to detect buffer overflow by using OSSEC (a HIDS software) as mentioned in OSSEC rules example and OSSEC book.

How can I configure OSSEC for detect a simple buffer overflow example as the following:

#include <string.h>
#include <stdio.h>
void main(int argc, char *argv[]) {
    char buffer[100];
    strcpy(buffer, argv[1]);
    printf("Done!\n");
}
1
  • I think default settings include alerting on bofs and program crashes Commented May 22, 2017 at 11:52

2 Answers 2

2

Bear in mind that OSSEC is a log-based HIDS. Knowing that, it is clear that OSSEC will be able to react only if someone (eg.: a daemon) adds a log that matches some Buffer Overflow rule.

See the official code example that you've mentioned.

1

If you are looking for detection of stage-one attacks (shellcode in a process) there is EMET, WDEG aka EMET II (for Windows) and Lotan (cross-platform).

Leviathan Security has posted on Lotan at least twice here:

EMET has been capable of similar through the 3.0 Notifier or the 5.5 Event-Log mechanisms.

1

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.