• No results found

Using Static Program Analysis to Aid Intrusion Detection

N/A
N/A
Protected

Academic year: 2021

Share "Using Static Program Analysis to Aid Intrusion Detection"

Copied!
78
0
0

Loading.... (view fulltext now)

Full text

(1)

Using Static Program Analysis to Aid Intrusion Detection

M. Egele M. Szydlowski E. Kirda C. Kruegel

Secure Systems Lab Vienna University of Technology

SIG SIDAR Conference on Detection of Intrusions and

Malware & Vulnerability Assessment, 2006

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(2)

outline

1 Motivation

2 Analysis

Mode of Operation

Parse Application Sourcecode Find Parameter Entry Points Parameter Name Extraction Type Inference

Value Extraction

3 Evaluation

How We Evaluated Our Results

(3)

what we want to do and why

PHP is arguably the most prominent language to develop web-based applications

Many exploits for vulnerabilities in PHP-applications exist User/attacker can influence the application mainly via its parameters

We employ interprocedural dataflow analysis to gain knowledge about used parameters

Especially types and possible values of parameters are interesting

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(4)

what we want to do and why

PHP is arguably the most prominent language to develop web-based applications

Many exploits for vulnerabilities in PHP-applications exist User/attacker can influence the application mainly via its parameters

We employ interprocedural dataflow analysis to gain knowledge about used parameters

Especially types and possible values of parameters are

(5)

what we want to do and why

PHP is arguably the most prominent language to develop web-based applications

Many exploits for vulnerabilities in PHP-applications exist User/attacker can influence the application mainly via its parameters

We employ interprocedural dataflow analysis to gain knowledge about used parameters

Especially types and possible values of parameters are interesting

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(6)

what we want to do and why

PHP is arguably the most prominent language to develop web-based applications

Many exploits for vulnerabilities in PHP-applications exist User/attacker can influence the application mainly via its parameters

We employ interprocedural dataflow analysis to gain knowledge about used parameters

Especially types and possible values of parameters are

(7)

what we want to do and why

PHP is arguably the most prominent language to develop web-based applications

Many exploits for vulnerabilities in PHP-applications exist User/attacker can influence the application mainly via its parameters

We employ interprocedural dataflow analysis to gain knowledge about used parameters

Especially types and possible values of parameters are interesting

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(8)

existing intrusion detection system

MAID tries to characterize web-requests through different models:

Learning based intrusion detection system developed at the Secure Systems Lab TU Vienna.

models include parameter presence/absence model, structural inference, token finder models . . .

No a priori knowledge of applications it protects

learning is basically done via logfile analysis

(9)

existing intrusion detection system

MAID tries to characterize web-requests through different models:

Learning based intrusion detection system developed at the Secure Systems Lab TU Vienna.

models include parameter presence/absence model, structural inference, token finder models . . .

No a priori knowledge of applications it protects learning is basically done via logfile analysis

In some cases unnecessary imprecision leads to many false positives → this is what we want to improve

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(10)

existing intrusion detection system

MAID tries to characterize web-requests through different models:

Learning based intrusion detection system developed at the Secure Systems Lab TU Vienna.

models include parameter presence/absence model, structural inference, token finder models . . .

No a priori knowledge of applications it protects

learning is basically done via logfile analysis

(11)

existing intrusion detection system

MAID tries to characterize web-requests through different models:

Learning based intrusion detection system developed at the Secure Systems Lab TU Vienna.

models include parameter presence/absence model, structural inference, token finder models . . .

No a priori knowledge of applications it protects learning is basically done via logfile analysis

In some cases unnecessary imprecision leads to many false positives → this is what we want to improve

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(12)

mode of operation

Output:

Parameter Info

Link Parameters

and Usage

Track Variable

Values

Variable Type Inference

Identify Interesting Parameters Abstract

Represen−

tation Input:

PHP Source File

Parse Includes

File and

Action performed parse the

application

source code

(13)

mode of operation

Output:

Parameter Info

Link Parameters

and Usage

Track Variable

Values

Variable Type Inference Abstract

Represen−

tation Input:

PHP Source File

Parse Includes

File and

Identify Interesting

Parameters

Action performed

identify the parameters the application accepts

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(14)

mode of operation

Output:

Parameter Info

Abstract Represen−

tation Input:

PHP Source File

Parse Includes

File and

Identify Interesting Parameters

Variable Type Inference Track

Variable Values Link

Parameters and Usage

Action performed

type inference on

variables

(15)

mode of operation

Output:

Parameter Info

Abstract Represen−

tation Input:

PHP Source File

Parse Includes

File and

Identify Interesting Parameters

Variable Type Inference Track

Variable Values Link

Parameters and Usage

Action performed variables values are tracked

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(16)

mode of operation

Output:

Parameter Info

Abstract Represen−

tation Input:

PHP Source File

Parse Includes

File and

Identify Interesting Parameters

Variable Type Inference Track

Variable Values Link

Parameters and Usage

Action performed

parameter usage

is examined

(17)

parsing

Original Zend language parser was used Includes are resolved (constant expressions) Variables and functions are identified

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(18)

parsing

Original Zend language parser was used

Includes are resolved (constant expressions)

Variables and functions are identified

(19)

parsing

Original Zend language parser was used Includes are resolved (constant expressions) Variables and functions are identified

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(20)

how parameters can be accessed in PHP

Parameter name is index into a parameter

array e.g., $_GET, $_POST superglobals

Via register_globals risky

(21)

how parameters can be accessed in PHP

Parameter name is index into a parameter array e.g., $_GET, $_POST superglobals Via register_globals risky

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(22)

example on accessing parameters

1 class Util {

2 function getGet($var, $default = null) { 3 return (isset($_GET[$var]))

4 ? Util::dispelMagicQuotes($_GET[$var])

5 : $default;

6 }

7 function getFormData($arg, $default = null) { 8 return (($val = Util::getPost($arg)) !== null)

9 ? $val

10 : Util::getGet($arg, $default);

11 }

(23)

example on accessing parameters

1 class Util {

2 function getGet($var, $default = null) { 3 return (isset($_GET[$var]))

4 ? Util::dispelMagicQuotes($_GET[$var])

5 : $default;

6 }

7 function getFormData($arg, $default = null) { 8 return (($val = Util::getPost($arg)) !== null)

9 ? $val

10 : Util::getGet($arg, $default);

11 }

12 } 13

14 $actionID = Util::getFormData(’actionid’)

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(24)

example on accessing parameters

1 class Util {

2 function getGet($var, $default = null) { 3 return (isset($_GET[$var]))

4 ? Util::dispelMagicQuotes($_GET[$var])

5 : $default;

6 }

7 function getFormData($arg, $default = null) { 8 return (($val = Util::getPost($arg)) !== null)

9 ? $val

10 : Util::getGet($arg, $default);

11 }

(25)

example on accessing parameters

1 class Util {

2 function getGet($var, $default = null) { 3 return (isset($_GET[$var]))

4 ? Util::dispelMagicQuotes($_GET[$var])

5 : $default;

6 }

7 function getFormData($arg, $default = null) { 8 return (($val = Util::getPost($arg)) !== null)

9 ? $val

10 : Util::getGet($arg, $default);

11 }

12 } 13

14 $actionID = Util::getFormData(’actionid’)

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(26)

example on accessing parameters

1 class Util {

2 function getGet($var, $default = null) { 3 return (isset($_GET[$var]))

4 ? Util::dispelMagicQuotes($_GET[$var])

5 : $default;

6 }

7 function getFormData($arg, $default = null) { 8 return (($val = Util::getPost($arg)) !== null)

9 ? $val

10 : Util::getGet($arg, $default);

11 }

(27)

example on accessing parameters

1 class Util {

2 function getGet($var, $default = null) { 3 return (isset($_GET[$var]))

4 ? Util::dispelMagicQuotes($_GET[$var])

5 : $default;

6 }

7 function getFormData($arg, $default = null) { 8 return (($val = Util::getPost($arg)) !== null)

9 ? $val

10 : Util::getGet($arg, $default);

11 }

12 } 13

14 $actionID = Util::getFormData(’actionid’)

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(28)

example on accessing parameters

1 class Util {

2 function getGet($var, $default = null) { 3 return (isset($_GET[$var]))

4 ? Util::dispelMagicQuotes($_GET[$var])

5 : $default;

6 }

7 function getFormData($arg, $default = null) { 8 return (($val = Util::getPost($arg)) !== null)

9 ? $val

10 : Util::getGet($arg, $default);

11 }

(29)

example on accessing parameters

1 class Util {

2 function getGet($var, $default = null) { 3 return (isset($_GET[$var]))

4 ? Util::dispelMagicQuotes($_GET[$var])

5 : $default;

6 }

7 function getFormData($arg, $default = null) { 8 return (($val = Util::getPost($arg)) !== null)

9 ? $val

10 : Util::getGet($arg, $default);

11 }

12 } 13

14 $actionID = Util::getFormData(’actionid’)

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(30)

how we find the parameter names

1

Dataflow analysis at procedural level

2

Interprocedural analysis for function calls (recursive)

3

This information can be used for the

parameter presence/absence model of our

IDS

(31)

how we find the parameter names

1

Dataflow analysis at procedural level

2

Interprocedural analysis for function calls (recursive)

3

This information can be used for the parameter presence/absence model of our IDS

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(32)

how we find the parameter names

1

Dataflow analysis at procedural level

2

Interprocedural analysis for function calls (recursive)

3

This information can be used for the

parameter presence/absence model of our

IDS

(33)

parameter types - valuable information

Very useful for the IDS (e.g., integers {-}?[0-9]+)

PHP only has dynamic types (e.g., no int

$x) and every value is dynamically typecast to whatever type expected by a given operation

Type inference through applied operations via type matrix, special cases include:

&&,||,xor,! always return boolean . always returns string

&,|,ˆ string iff operands are string - integer otherwise

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(34)

parameter types - valuable information

Very useful for the IDS (e.g., integers {-}?[0-9]+)

PHP only has dynamic types (e.g., no int

$x) and every value is dynamically typecast to whatever type expected by a given operation

Type inference through applied operations via type matrix, special cases include:

&&,||,xor,! always return boolean

(35)

parameter types - valuable information

Very useful for the IDS (e.g., integers {-}?[0-9]+)

PHP only has dynamic types (e.g., no int

$x) and every value is dynamically typecast to whatever type expected by a given operation

Type inference through applied operations via type matrix, special cases include:

&&,||,xor,! always return boolean . always returns string

&,|,ˆ string iff operands are string - integer otherwise

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(36)

parameter types - valuable information

Very useful for the IDS (e.g., integers {-}?[0-9]+)

PHP only has dynamic types (e.g., no int

$x) and every value is dynamically typecast to whatever type expected by a given operation

Type inference through applied operations via type matrix, special cases include:

&&,||,xor,! always return boolean

(37)

parameter types - valuable information

Very useful for the IDS (e.g., integers {-}?[0-9]+)

PHP only has dynamic types (e.g., no int

$x) and every value is dynamically typecast to whatever type expected by a given operation

Type inference through applied operations via type matrix, special cases include:

&&,||,xor,! always return boolean . always returns string

&,|,ˆ string iff operands are string - integer otherwise

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(38)

parameter types - valuable information

Very useful for the IDS (e.g., integers {-}?[0-9]+)

PHP only has dynamic types (e.g., no int

$x) and every value is dynamically typecast to whatever type expected by a given operation

Type inference through applied operations via type matrix, special cases include:

&&,||,xor,! always return boolean

(39)

parameter types

1

Try to infer as many variables as possible via the operator-type matrix

2

If a parameter is linked to a variable, assume the parameter has the same type as the variable.

1 $x = $_GET[’THE_X’];

2 if ($x == 42) 3 echo “x is 42”;

4 else

5 echo “error x is not 42”

3

Use the more general type if there is a conflict

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(40)

parameter types

1

Try to infer as many variables as possible via the operator-type matrix

2

If a parameter is linked to a variable, assume the parameter has the same type as the variable.

1 $x = $_GET[’THE_X’];

2 if ($x == 42) 3 echo “x is 42”;

4 else

(41)

parameter types

1

Try to infer as many variables as possible via the operator-type matrix

2

If a parameter is linked to a variable, assume the parameter has the same type as the variable.

1 $x = $_GET[’THE_X’];

2 if ($x == 42) 3 echo “x is 42”;

4 else

5 echo “error x is not 42”

3

Use the more general type if there is a conflict

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(42)

possible value sets

1

Direct comparison via literal

2

Indirect comparison via switch-case construct

3

sanitation code (e.g., regexp, built-in functions) – annotations possible

4

This information can be used for the

structural models and character distribution

(43)

possible value sets

1

Direct comparison via literal

2

Indirect comparison via switch-case construct

3

sanitation code (e.g., regexp, built-in functions) – annotations possible

4

This information can be used for the

structural models and character distribution models of our IDS

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(44)

possible value sets

1

Direct comparison via literal

2

Indirect comparison via switch-case construct

3

sanitation code (e.g., regexp, built-in functions) – annotations possible

4

This information can be used for the

structural models and character distribution

(45)

possible value sets

1

Direct comparison via literal

2

Indirect comparison via switch-case construct

3

sanitation code (e.g., regexp, built-in functions) – annotations possible

4

This information can be used for the

structural models and character distribution models of our IDS

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(46)

the annotation used for SquirrelMail

SquirrelMail uses the sqgetGlobalVar function to retrieve its parameters.

first argument: name of the parameter second argument: reference to the variable that should receive the value

annotation: sqgetGlobalVar:1:2

code: sqgetGlobalVar(’THE_X’, &$x)

now the analyzer knows that $x holds the

(47)

the annotation used for SquirrelMail

SquirrelMail uses the sqgetGlobalVar function to retrieve its parameters.

first argument: name of the parameter second argument: reference to the variable that should receive the value

annotation: sqgetGlobalVar:1:2

code: sqgetGlobalVar(’THE_X’, &$x) now the analyzer knows that $x holds the value of the parameter THE_X

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(48)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) {

12 case "something else":

(49)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) { 12 case "something else":

13 ...

14 }

15 preg_match("/^([0-9]4).*", $thirdparam, $number);

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(50)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) {

12 case "something else":

(51)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) { 12 case "something else":

13 ...

14 }

15 preg_match("/^([0-9]4).*", $thirdparam, $number);

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(52)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) {

12 case "something else":

(53)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) { 12 case "something else":

13 ...

14 }

15 preg_match("/^([0-9]4).*", $thirdparam, $number);

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(54)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) {

12 case "something else":

(55)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) { 12 case "something else":

13 ...

14 }

15 preg_match("/^([0-9]4).*", $thirdparam, $number);

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(56)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) {

12 case "something else":

(57)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) { 12 case "something else":

13 ...

14 }

15 preg_match("/^([0-9]4).*", $thirdparam, $number);

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(58)

1 $otherparam = Util::getFormData("otherparam");

2 $param = array(

3 "name" => "pizzaman",

4 "value" => Util::getFormData("param"), 5 "info" => "something boring");

6 $thirdparam = do_something($_POST["thirdparam"]);

7

8 $strippedparam = stripslashes($param["value"]);

9 if ($strippedparam == "something") 10 ...

11 switch ($otherparam) {

12 case "something else":

(59)

how we evaluated our results

Evaluation is divided into two parts:

Standalone Analysis of five real world web-applications Crosscheck of some of these results with actual log data only GET requests, since POST requests not logged

We were able to find all parameters that actually appeared in the logs

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(60)

how we evaluated our results

Evaluation is divided into two parts:

Standalone Analysis of five real world web-applications Crosscheck of some of these results with actual log data only GET requests, since POST requests not logged

We were able to find all parameters that actually appeared

in the logs

(61)

web applications under examination

We analyzed the following popular web applications

Application Parameters Details Percentage

Horde2/IMP3.1 153 47 31%

Squirrelmail 1.4.6-rc1 268 91 34%

phpBB 2.0.17 316 82 26%

Horde3/IMP4.0.2 298 64 21%

PHP iCalendar 2.1 23 15 65%

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(62)

info on parameters found

Examples of our findings

Details for parameters ≈ 35% → information for IDS Horde2: actionID TYPE_INT values: 0,1,101,102, . . . Horde3: actionID TYPE_STRING values:

’add_address’, ’add_attachment’, . . . iCalendar: getdate TYPE_STRING

preg_match("/([0-9]4)([0-9]2)([0-9]2)/")

(63)

info on parameters found

Examples of our findings

Details for parameters ≈ 35% → information for IDS Horde2: actionID TYPE_INT values: 0,1,101,102, . . . Horde3: actionID TYPE_STRING values:

’add_address’, ’add_attachment’, . . . iCalendar: getdate TYPE_STRING

preg_match("/([0-9]4)([0-9]2)([0-9]2)/")

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(64)

info on parameters found

Examples of our findings

Details for parameters ≈ 35% → information for IDS Horde2: actionID TYPE_INT values: 0,1,101,102, . . . Horde3: actionID TYPE_STRING values:

’add_address’, ’add_attachment’, . . . iCalendar: getdate TYPE_STRING

preg_match("/([0-9]4)([0-9]2)([0-9]2)/")

(65)

crosscheck with real log data

Results for Horde2/IMP 3.1

Timeframe: three months, 30.000 accesses

name: reason type: TYPE_STRING values: ’failed’,

’logout’, ’session’ exact matches to, cc, bcc only information TYPE_STRING f filename to download-dialog (relict) replaced by MIME-Header parsing

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(66)

crosscheck with real log data

Results for Horde2/IMP 3.1

Timeframe: three months, 30.000 accesses

name: reason type: TYPE_STRING values: ’failed’,

’logout’, ’session’ exact matches

to, cc, bcc only information TYPE_STRING

f filename to download-dialog (relict) replaced by

MIME-Header parsing

(67)

crosscheck with real log data

Results for Horde2/IMP 3.1

Timeframe: three months, 30.000 accesses

name: reason type: TYPE_STRING values: ’failed’,

’logout’, ’session’ exact matches to, cc, bcc only information TYPE_STRING f filename to download-dialog (relict) replaced by MIME-Header parsing

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(68)

crosscheck with real log data

Results for Horde2/IMP 3.1

Timeframe: three months, 30.000 accesses

name: reason type: TYPE_STRING values: ’failed’,

’logout’, ’session’ exact matches

to, cc, bcc only information TYPE_STRING

f filename to download-dialog (relict) replaced by

MIME-Header parsing

(69)

crosscheck with real log data

Results for Squirrelmail

Timeframe: three weeks, 13.000 accesses

name: smaction type: TYPE_STRING values: ’draft’,

’edit_as_new’, ’forward’,

’forward_as_attachment’, ’reply’,

’reply_all’ exact matches

what, where type: TYPE_STRING dynamic search parameters

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(70)

crosscheck with real log data

Results for Squirrelmail

Timeframe: three weeks, 13.000 accesses

name: smaction type: TYPE_STRING values: ’draft’,

’edit_as_new’, ’forward’,

’forward_as_attachment’, ’reply’,

’reply_all’ exact matches

what, where type: TYPE_STRING dynamic search

parameters

(71)

crosscheck with real log data

Results for Squirrelmail

Timeframe: three weeks, 13.000 accesses

name: smaction type: TYPE_STRING values: ’draft’,

’edit_as_new’, ’forward’,

’forward_as_attachment’, ’reply’,

’reply_all’ exact matches

what, where type: TYPE_STRING dynamic search parameters

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(72)

crosscheck with real log data

Evaluation shows that we were able to find all parameters in the sourcecode that are actually used

For about 35%, detailed information on these parameters could be deduced by our analyzer

This additional information can be used to improve the

precision of our IDS

(73)

crosscheck with real log data

Evaluation shows that we were able to find all parameters in the sourcecode that are actually used

For about 35%, detailed information on these parameters could be deduced by our analyzer

This additional information can be used to improve the precision of our IDS

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(74)

crosscheck with real log data

Evaluation shows that we were able to find all parameters in the sourcecode that are actually used

For about 35%, detailed information on these parameters could be deduced by our analyzer

This additional information can be used to improve the

precision of our IDS

(75)

details on phpBB

Scenario:

December 2005 mass defacement of phpBB 2.0.17 Exploit modifies the GLOBALS array via:

profile.php?GLOBALS[...]

Parameter presence and absence model → GLOBALS not a parameter of the web-application

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(76)

details on phpBB

Scenario:

December 2005 mass defacement of phpBB 2.0.17 Exploit modifies the GLOBALS array via:

profile.php?GLOBALS[...]

Parameter presence and absence model → GLOBALS not

a parameter of the web-application

(77)

details on phpBB

Scenario:

December 2005 mass defacement of phpBB 2.0.17 Exploit modifies the GLOBALS array via:

profile.php?GLOBALS[...]

Parameter presence and absence model → GLOBALS not a parameter of the web-application

M. Egele, M. Szydlowski, E. Kirda, C. Kruegel Using Static Program Analysis to Aid Intrusion Detection

(78)

Summary

Parameter name detection via inter-procedural dataflow analysis Determine types and possible values of parameters based on their use by the application

Would have been able to detect

real-world exploit

References

Related documents

Therefore, it is necessary to detect the attacks, using an Intrusion Detection System (IDS). IDS is used to detect the packets in a network, and determine whether they

In this article we considered a model of anomaly detection that uses machine learning algorithms for data mining in a network to detect anomalies present at any time.. This

We integrate the layered framework with the conditional random fields to gain the benefits of computational efficiency, wide attack detection coverage and high accuracy of

There are two main types: One is the first order derivative-based edge detection operator used to detect edges of an image by computing its gradient values, such as Robert

An IDS is able to detect both the attacks by analyzing the profile of its authorized user (former) and by detecting the unwanted interruption (later). Several types of IDSs are

These techniques are able to automatically retrain intrusion detection models different input data that include new types of attacks, as long as they have been labeled

Keywords: Classification, Data Mining, Intrusion Detection System, Security, Anomaly Detection, Types of attacks, Machine Learning

The proposed wireless intrusion detection system will detect intrusion automatically, through multi-level detection mechanism (IR sensor & camera) and will