Volg ons op Twitter voor updates en andere mededelingen van het Webhostingtalk Team!

» Advertentie




Ga terug   webhostingtalk.nl > Usenet Nieuwsgroepen > Nieuwsgroepen > Bugtraq mailing lijst

Tags:


Reageren
 
LinkBack Discussietools Weergave
  #1 (permalink)  
Oud 1 November 2004, 20:05
Gunter Ollmann
Gast
 
Berichten: n/a
New Whitepaper - "Second-order Code Injection Attacks"

Hi list,

NGS Software is pleased to make available a new whitepaper about
second-order code injection attacks.

Abstract:
"Many forms of code injection targeted at web-based applications (for
instance cross-site scripting and SQL injection) rely upon the instantaneous
execution of the embedded code to carry out the attack (e.g. stealing a
user's current session information or executing a modified SQL query). In
some cases it may be possible for an attacker to inject their malicious code
into a data storage area that may be executed at a later date or time.
Depending upon the nature of the application and the way the malicious data
is stored or rendered, the attacker may be able to conduct a second-order
code injection attack.

A second-order code injection attack can be classified as the process in
which malicious code is injected into a web-based application and not
immediately executed, but instead is stored by the application (e.g.
temporarily cached, logged, stored in a database) and then later retrieved,
rendered and executed by the victim."

The paper can be accessed from:
http://www.nextgenss.com/papers/Seco...eInjection.pdf


Cheers,

Gunter

------------------------------------------------------
G u n t e r O l l m a n n, MSc(Hons), BSc
Professional Services Director

Next Generation Security Software Ltd.
First Floor, 52 Throwley Way Tel: +44 (0)208 401 0089
Sutton, Surrey, SM1 4BF, UK Fax: +44 (0)208 401 0076
http://www.nextgenss.com
------------------------------------------------------



Met citaat reageren
  #2 (permalink)  
Oud 2 November 2004, 22:25
Crispin Cowan
Gast
 
Berichten: n/a
Re: New Whitepaper - "Second-order Code Injection Attacks"

I found an instance of this class of vulnerability in 1998 where an
attacker could inject code into the "locate" database, which would later
be executed when root tried to do a locate on some path name
http://msgs.securepoint.com/cgi-bin/...raq/601/1.html

Mine was not the first such"secondary code injection" attack. It was a
consequence of exploring a PoC by MiG for a buffer overflow
vulnerability in bash, where in a tall directory tree would overflow
bash when you try to cd into that directory and you have the pwd set to
be part of your prompt. At the time, it did not occur to me that it was
a special kind of buffer overflow.

Crispin

Gunter Ollmann wrote:

>Hi list,
>
>NGS Software is pleased to make available a new whitepaper about
>second-order code injection attacks.
>
>Abstract:
>"Many forms of code injection targeted at web-based applications (for
>instance cross-site scripting and SQL injection) rely upon the instantaneous
>execution of the embedded code to carry out the attack (e.g. stealing a
>user's current session information or executing a modified SQL query). In
>some cases it may be possible for an attacker to inject their malicious code
>into a data storage area that may be executed at a later date or time.
>Depending upon the nature of the application and the way the malicious data
>is stored or rendered, the attacker may be able to conduct a second-order
>code injection attack.
>
>A second-order code injection attack can be classified as the process in
>which malicious code is injected into a web-based application and not
>immediately executed, but instead is stored by the application (e.g.
>temporarily cached, logged, stored in a database) and then later retrieved,
>rendered and executed by the victim."
>
>The paper can be accessed from:
>http://www.nextgenss.com/papers/Seco...eInjection.pdf
>
>
>Cheers,
>
>Gunter
>
>------------------------------------------------------
>G u n t e r O l l m a n n, MSc(Hons), BSc
>Professional Services Director
>
>Next Generation Security Software Ltd.
>First Floor, 52 Throwley Way Tel: +44 (0)208 401 0089
>Sutton, Surrey, SM1 4BF, UK Fax: +44 (0)208 401 0076
>http://www.nextgenss.com
>------------------------------------------------------
>
>
>
>
>


--
Crispin Cowan, Ph.D. http://immunix.com/~crispin/
CTO, Immunix http://immunix.com

Met citaat reageren
  #3 (permalink)  
Oud 3 November 2004, 01:05
Jeff Williams
Gast
 
Berichten: n/a
Re: New Whitepaper - "Second-order Code Injection Attacks"

Gunter,

Thanks for the comprehensive treatment of this class of vulnerabilities. The
OWASP Top Ten paper breaks down XSS flaws into "stored" and "reflected"
categories, but your paper is far closer to a complete theory about all the
ways that tainted data can undermine the security of applications.

--Jeff

----- Original Message -----
From: "Crispin Cowan" <crispin@immunix.com>
To: "Gunter Ollmann" <gunter@ngssoftware.com>
Cc: <bugtraq@securityfocus.com>
Sent: Monday, November 01, 2004 8:45 PM
Subject: Re: New Whitepaper - "Second-order Code Injection Attacks"


> I found an instance of this class of vulnerability in 1998 where an
> attacker could inject code into the "locate" database, which would later
> be executed when root tried to do a locate on some path name
> http://msgs.securepoint.com/cgi-bin/...raq/601/1.html
>
> Mine was not the first such"secondary code injection" attack. It was a
> consequence of exploring a PoC by MiG for a buffer overflow
> vulnerability in bash, where in a tall directory tree would overflow
> bash when you try to cd into that directory and you have the pwd set to
> be part of your prompt. At the time, it did not occur to me that it was
> a special kind of buffer overflow.
>
> Crispin
>
> Gunter Ollmann wrote:
>
> >Hi list,
> >
> >NGS Software is pleased to make available a new whitepaper about
> >second-order code injection attacks.
> >
> >Abstract:
> >"Many forms of code injection targeted at web-based applications (for
> >instance cross-site scripting and SQL injection) rely upon the

instantaneous
> >execution of the embedded code to carry out the attack (e.g. stealing a
> >user's current session information or executing a modified SQL query).

In
> >some cases it may be possible for an attacker to inject their malicious

code
> >into a data storage area that may be executed at a later date or time.
> >Depending upon the nature of the application and the way the malicious

data
> >is stored or rendered, the attacker may be able to conduct a second-order
> >code injection attack.
> >
> >A second-order code injection attack can be classified as the process in
> >which malicious code is injected into a web-based application and not
> >immediately executed, but instead is stored by the application (e.g.
> >temporarily cached, logged, stored in a database) and then later

retrieved,
> >rendered and executed by the victim."
> >
> >The paper can be accessed from:
> >http://www.nextgenss.com/papers/Seco...eInjection.pdf
> >
> >
> >Cheers,
> >
> >Gunter
> >
> >------------------------------------------------------
> >G u n t e r O l l m a n n, MSc(Hons), BSc
> >Professional Services Director
> >
> >Next Generation Security Software Ltd.
> >First Floor, 52 Throwley Way Tel: +44 (0)208 401 0089
> >Sutton, Surrey, SM1 4BF, UK Fax: +44 (0)208 401 0076
> >http://www.nextgenss.com
> >------------------------------------------------------
> >
> >
> >
> >
> >

>
> --
> Crispin Cowan, Ph.D. http://immunix.com/~crispin/
> CTO, Immunix http://immunix.com
>


Met citaat reageren
  #4 (permalink)  
Oud 3 November 2004, 03:45
Gunter Ollmann
Gast
 
Berichten: n/a
RE: New Whitepaper - "Second-order Code Injection Attacks"

Cool.

I make no claims that this a previously "undiscovered" security flaw. I
myself have been exploiting these kinds of flaws in web-based applications
for many years as well. However, the purpose of the paper is two fold.

[Classification] -- Firstly, the paper attempts to classify the second-order
code injection attacks, and differentiate between other immediate effects of
code injection into web applications. Hopefully making it a little easier
for professional pentesters to explain the significance of their findings.

[Awareness] -- Secondly, too many organisations that I come across don't
really understand what code injection is - everything is either cross-site
scripting or SQL injection. I believe it is important to clearly
differentiate between the code injection attacks - and to explain their
significance within a corporate environment.

What gets me is that to properly assess the security of any modern web-based
application now days, to properly check for second-order code injection
attacks, security teams must also have access to and assess the supporting
applications as well -- ranging from the customer-support applications
reviewing client account details, through to centralised log analysis and
management tools. In way too many client pentesting reports I've written
over the years, the exploitation of backend systems/processes through
second-order code injection attacks were far more damaging to their
corporate security than a bit of cross-site scripting and session hijacking
on their exposed web application.

Cheers,

Gunter

> -----Original Message-----
> From: Crispin Cowan [mailto:crispin@immunix.com]
> Sent: 02 November 2004 01:46
> To: Gunter Ollmann
> Cc: bugtraq@securityfocus.com
> Subject: Re: New Whitepaper - "Second-order Code Injection Attacks"
>
> I found an instance of this class of vulnerability in 1998 where an
> attacker could inject code into the "locate"
> database, which would later be executed when root tried to do a locate
> on some path name
> http://msgs.securepoint.com/cgi-bin/...raq/601/1.html
>
> Mine was not the first such"secondary code injection" attack.
> It was a consequence of exploring a PoC by MiG for a buffer overflow
> vulnerability in bash, where in a tall directory tree would overflow
> bash when you try to cd into that directory and you have the pwd set
> to be part of your prompt.
> At the time, it did not occur to me that it was a special kind of
> buffer overflow.
>
> Crispin
>
> Gunter Ollmann wrote:
>
> >Hi list,
> >
> >NGS Software is pleased to make available a new whitepaper about
> >second-order code injection attacks.
> >
> >Abstract:
> >"Many forms of code injection targeted at web-based

> applications (for
> >instance cross-site scripting and SQL injection) rely upon the
> >instantaneous execution of the embedded code to carry out the attack
> >(e.g. stealing a user's current session information or executing a
> >modified SQL query). In some cases it may be possible for

> an attacker
> >to inject their malicious code into a data storage area that

> may be executed at a later date or time.
> >Depending upon the nature of the application and the way the

> malicious
> >data is stored or rendered, the attacker may be able to conduct a
> >second-order code injection attack.
> >
> >A second-order code injection attack can be classified as

> the process
> >in which malicious code is injected into a web-based application and
> >not immediately executed, but instead is stored by the

> application (e.g.
> >temporarily cached, logged, stored in a database) and then later
> >retrieved, rendered and executed by the victim."
> >
> >The paper can be accessed from:
> >http://www.nextgenss.com/papers/Seco...eInjection.pdf
> >
> >
> >Cheers,
> >
> >Gunter
> >
> >------------------------------------------------------
> >G u n t e r O l l m a n n, MSc(Hons), BSc
> >Professional Services Director
> >
> >Next Generation Security Software Ltd.
> >First Floor, 52 Throwley Way Tel: +44 (0)208 401 0089
> >Sutton, Surrey, SM1 4BF, UK Fax: +44 (0)208 401 0076
> >http://www.nextgenss.com
> >------------------------------------------------------
> >
> >
> >
> >
> >

>
> --
> Crispin Cowan, Ph.D. http://immunix.com/~crispin/
> CTO, Immunix http://immunix.com
>
>
>



Met citaat reageren
  #5 (permalink)  
Oud 3 November 2004, 19:15
Nicolas Gregoire
Gast
 
Berichten: n/a
Re: New Whitepaper - "Second-order Code Injection Attacks"

Le lun 01/11/2004 à 18:36, Gunter Ollmann a écrit :

> NGS Software is pleased to make available a new whitepaper about
> second-order code injection attacks.


Class 3 attacks are often met in large corporations where the Web is the
standard way (for both internal employées and "clients") to interact
with the corporate data.

I've seen some webapps audits where :
- malicous data can be inserted via the main corporate website by
anybody with a valid email
- the main processing is done deep in the internal network, through the
Intranet
- the Intranet *must* (corporate policy) be configured as Fully Trusted
in Internet Explorer, allowing the attacker to use, for example,
unsigned ActiveX to hack internal machines.

Not sanitizing input is bad, but storing it for later processing with
different privileges is much worse ...

--
Nicolas Gregoire ----- Consultant en Sécurité des Systèmes d'Information
ngregoire@exaprobe.com ------[ ExaProbe ]------ http://www.exaprobe.com/
PGP KeyID:CA61B44F FingerPrint:1CC647FF1A55664BA2D2AFDACA6A21DACA61B4 4F

Met citaat reageren
  #6 (permalink)  
Oud 5 November 2004, 22:25
Gunter Ollmann
Gast
 
Berichten: n/a
RE: New Whitepaper - "Second-order Code Injection Attacks"

Jeff,

I see XSS as merely a subgroup of code injection attacks - and it is
important to make that distinction. While they (as in XSS) still get a lot
of press coverage, they're not particularly remarkable. The most effective
attacks abusing XSS vulnerabilities to date would probably be within
Phishing attacks - thankfully something that the press havn't focused upon.

The OWASP categories of "stored" or "reflected", while good for a basic
understanding, are a little too limited in scope to cover all XSS
vulnerabilities. They are certainly inadequate for covering much of the
code injection possibilities.

Having said all that, it still suprises me how many people think that by
testing for <script>alert('XSS')</script> - getting a positive response -
means that an application is 100% vulnerable to XSS. People need to be a
lot clearer about the types of code injection flaws a web-based application
is vulnerable to -- instead of using a Cross-site Scripting catchall tag.

Cheers,

Gunter


> -----Original Message-----
> From: Jeff Williams [mailto:jeff.williams@aspectsecurity.com]
> Sent: 02 November 2004 20:44
> To: Crispin Cowan; Gunter Ollmann
> Cc: bugtraq@securityfocus.com; webappsec@securityfocus.com
> Subject: Re: New Whitepaper - "Second-order Code Injection Attacks"
>
> Gunter,
>
> Thanks for the comprehensive treatment of this class of
> vulnerabilities. The OWASP Top Ten paper breaks down XSS flaws into
> "stored" and "reflected"
> categories, but your paper is far closer to a complete theory about
> all the ways that tainted data can undermine the security of
> applications.
>
> --Jeff
>
> ----- Original Message -----
> From: "Crispin Cowan" <crispin@immunix.com>
> To: "Gunter Ollmann" <gunter@ngssoftware.com>
> Cc: <bugtraq@securityfocus.com>
> Sent: Monday, November 01, 2004 8:45 PM
> Subject: Re: New Whitepaper - "Second-order Code Injection Attacks"
>
>
> > I found an instance of this class of vulnerability in 1998 where an
> > attacker could inject code into the "locate" database,

> which would later
> > be executed when root tried to do a locate on some path name
> > http://msgs.securepoint.com/cgi-bin/...raq/601/1.html
> >
> > Mine was not the first such"secondary code injection"

> attack. It was a
> > consequence of exploring a PoC by MiG for a buffer overflow
> > vulnerability in bash, where in a tall directory tree would overflow
> > bash when you try to cd into that directory and you have

> the pwd set to
> > be part of your prompt. At the time, it did not occur to me

> that it was
> > a special kind of buffer overflow.
> >
> > Crispin
> >
> > Gunter Ollmann wrote:
> >
> > >Hi list,
> > >
> > >NGS Software is pleased to make available a new whitepaper about
> > >second-order code injection attacks.
> > >
> > >Abstract:
> > >"Many forms of code injection targeted at web-based

> applications (for
> > >instance cross-site scripting and SQL injection) rely upon the

> instantaneous
> > >execution of the embedded code to carry out the attack

> (e.g. stealing a
> > >user's current session information or executing a modified

> SQL query).
> In
> > >some cases it may be possible for an attacker to inject

> their malicious
> code
> > >into a data storage area that may be executed at a later

> date or time.
> > >Depending upon the nature of the application and the way

> the malicious
> data
> > >is stored or rendered, the attacker may be able to conduct

> a second-order
> > >code injection attack.
> > >
> > >A second-order code injection attack can be classified as

> the process in
> > >which malicious code is injected into a web-based

> application and not
> > >immediately executed, but instead is stored by the

> application (e.g.
> > >temporarily cached, logged, stored in a database) and then later

> retrieved,
> > >rendered and executed by the victim."
> > >
> > >The paper can be accessed from:
> > >http://www.nextgenss.com/papers/Seco...eInjection.pdf
> > >
> > >
> > >Cheers,
> > >
> > >Gunter
> > >
> > >------------------------------------------------------
> > >G u n t e r O l l m a n n, MSc(Hons), BSc
> > >Professional Services Director
> > >
> > >Next Generation Security Software Ltd.
> > >First Floor, 52 Throwley Way Tel: +44 (0)208 401 0089
> > >Sutton, Surrey, SM1 4BF, UK Fax: +44 (0)208 401 0076
> > >http://www.nextgenss.com
> > >------------------------------------------------------
> > >
> > >
> > >
> > >
> > >

> >
> > --
> > Crispin Cowan, Ph.D. http://immunix.com/~crispin/
> > CTO, Immunix http://immunix.com
> >

>
>
>



Met citaat reageren
Advertenties
Reageren

Discussietools
Weergave

Regels voor berichten
Je mag geen nieuwe discussies starten
Je mag niet reageren op berichten
Je mag geen bijlagen versturen
Je mag niet je berichten bewerken

BB code is Aan
Smileys zijn Aan
[IMG]-code is Uit
HTML-code is Uit
Trackbacks are Aan
Pingbacks are Aan
Refbacks are Aan



no new posts

Content Relevant URLs by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519