Ihr Spezialist für komplexe IT-Systeme
 

When doing white box testing you have internal knowledge, so you have the view point of an insider. You can read the source code and you can view the configuration of the systems involved. Some people call white box testing also source code auditing. So you take the source code, you read it and you search for possible security holes.

It sounds like an easy job? But it is not! Ok sometimes it can be really easy, but in general it is a real hard job to find bugs in foreign code!

There are tools that help you to scan the source code. One of the tools is called R.A.T.S (Rough Auditing Tool for Security) or you could also use grep.

function getNews($p_id, $p_ctrl) {
  $query  = "SELECT id, value, title ";
  $query .=   "FROM News ";
  $query .=   "WHERE id = '" . $p_id . "' ";
     
  if($sth = mysql_query($query, $p_ctrl->getDB())) {
  …
  } else print("Error: ".$query."br\n");
}

To show you white box testing, read the above PHP source code snippet. Do you see any bugs? Anything you would have programmed different? Yea, the handling of the variable $p_id could cause some SQL injection possibilities. But the problem is, that it only could! It is not certain that it is a problem, because we do not know where the method getNews is call and if the arguments passed to this method are already filtered.

White box testing therefore often must be combined with the analysis of the data flow within the application. Otherwise you can not make sure that tainted data is handled correctly in all situations.