On Oracle, the following code will perform the attack, when
using iSQL*Plus:
Note that the first linebreak is the only
significant one, the others are introduced for
readability.
In the above example, the payload can be a script insertion or SSI attack. It is used both
as an attack and to select the proper query from the
v$sql view. This will cause the attack to fail
if multiple instances run at the same time, as the SELECT
query returns multiple values.
Exploit 2 shows a more
reliable Oracle exploit, but this one is considerably
larger.
In this case, the payload must be included twice,
once to copy it and once to execute it. This example allows
SQL injection
attacks.
|