Templates and Alerts
Race Condition Template
Privileged Setuid Script Executed
This template generates and forwards the following alert to a response program when a privileged setuid script is executed (either directly or through a symbolic link) and the kernel has honored the setuid bit:
Table | Setuid Script Executed Alert Properties |
| ||
|
|
|
|
|
Response |
| Alert |
|
|
Program | Alert Field | Field | Alert Value/Format | Description |
Argument |
| Type |
|
|
|
|
|
|
|
argv[1] | Template code | Integer | 1 | Unique code |
|
|
|
| assigned to template |
|
|
|
|
|
argv[2] | Version | Integer | 2 | Version of the |
|
|
|
| template |
|
|
|
|
|
argv[3] | Severity | Integer | 1 if executed via symbolic link; | Severity |
|
|
| otherwise 2. |
|
|
|
|
|
|
argv[4] | UTC Time | Integer | <secs> | UTC time in number |
|
|
|
| of seconds since |
|
|
|
| epoch when a |
|
|
|
| privileged setuid |
|
|
|
| script is executed. |
|
|
|
|
|
argv[5] | Attacker | String | “uid=<uid>, gid=<gid>, pid=<pid>, | The user ID, group |
|
|
| ppid=<ppid>” | ID, process ID, and |
|
|
|
| parent process ID of |
|
|
|
| the process that |
|
|
|
| executed a |
|
|
|
| privileged setuid |
|
|
|
| script. |
|
|
|
|
|
argv[6] | Target of | String | “file=<full pathname>, | The full pathname |
| Attack |
| mode=<mode>,uid=<uid>,gid=<gid, | of the privileged |
|
|
| setuid script and the | |
|
|
|
| |
|
|
| inode=<inode>,device=<device>” | script’s mode, uid, |
|
|
|
| gid, inode, and |
|
|
|
| device number. |
|
|
|
|
|
argv[7] | Summary | String | "Race condition attack" if script | Alert summary |
|
|
| executed via a symbolic link. |
|
|
|
| Otherwise, set to "Potential race |
|
|
|
| condition attack" |
|
|
|
|
|
|
144 | Appendix A |