elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado:


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web (Moderador: #!drvy)
| | |-+  Modificar controles dominio remoto
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Modificar controles dominio remoto  (Leído 5,572 veces)
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Modificar controles dominio remoto
« en: 20 Septiembre 2022, 11:22 am »

Buenas,

no sé mucho sobre desarrollo web, pero me preguntaba como podría hacer para cargar una página en un IFrame o lo que sea y luego poder toquetear los controles, por ej: si hay un <id="txtID"...>, completarlo con un texto que quiera.

Desde ya muchas gracias, saludos.


En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
el-brujo
ehn
***
Desconectado Desconectado

Mensajes: 21.580


La libertad no se suplica, se conquista


Ver Perfil WWW
Re: Modificar controles dominio remoto
« Respuesta #1 en: 20 Septiembre 2022, 17:05 pm »

¿?

En serio, estaría genial que te explicaras mejor lo que quieres hacer, porque mucho me temo que no se puede hacer.


En línea

Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: Modificar controles dominio remoto
« Respuesta #2 en: 20 Septiembre 2022, 18:21 pm »

En llano sería cargar otra página y completar datos (de esa página) y/o remover/agregar controles.
En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: Modificar controles dominio remoto
« Respuesta #3 en: 22 Septiembre 2022, 10:27 am »

Pude lograr algo:

Un archivo php (plagio.php) para descargar la página:
Código
  1. <?php
  2. $arrContextOptions=array(
  3. "ssl"=>array(
  4. "verify_peer"=>false,
  5. "verify_peer_name"=>false,
  6. ),
  7. );
  8.  
  9. $response = file_get_contents($_GET['url'], false, stream_context_create($arrContextOptions));
  10.  
  11. echo $response;
  12. ?>
  13.  

Desde plagio.html:
Código
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  4. function myFunction(remoteID)
  5. {
  6. var iframevar = document.getElementById('frameID');
  7. var elmnt = iframevar.contentWindow.document.getElementById(remoteID);
  8. alert(elmnt.value);
  9. }
  10. </script>
  11.    <style>
  12.        html,
  13. body {
  14.  height: 80%;
  15. }
  16.  
  17. div {
  18.  height: 99%;
  19. }
  20.  
  21. iframe {
  22.  width: 100%;
  23.  min-height: 100%;
  24. }
  25.    </style>
  26. </head>
  27.    <div id="siteloader">
  28. <iframe id="frameID" src="plagio.php?url=https://www.google.com"></iframe>
  29. </div>
  30.  
  31. <button onclick="myFunction("form")">Click me</button>
  32. </body>
  33. </html>
  34.  

Si bien carga la página, no puede seguir una secuencia de pasos mediante post y formularios, muere en la misma página, se ve que todavía lo web sigue en pañales :(

A alguien se le ocurre algo más?
En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
MinusFour
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.529


I'm fourth.


Ver Perfil WWW
Re: Modificar controles dominio remoto
« Respuesta #4 en: 22 Septiembre 2022, 17:19 pm »

Lo que quieres hacer sería obviamente un problema de seguridad. Que prevendría a un atacante forzarte a visitar una pagina en la que pudiera cargar cualquiera otra pagina? ¿Tu facebook, instagram, correo, tu banco? Encima no podrías fiarte de ninguna pagina.

Y por cierto, tu código de plagio.php es vulnerable a SSRF.
En línea

el-brujo
ehn
***
Desconectado Desconectado

Mensajes: 21.580


La libertad no se suplica, se conquista


Ver Perfil WWW
Re: Modificar controles dominio remoto
« Respuesta #5 en: 22 Septiembre 2022, 18:14 pm »

Para evitar este tipo de ataques, ya hace años, que, por suerte para eso inventaron todas las cabeceras de seguridad, aunque no todos los sitios están implementadas, la mayoría si.


Cabeceras de Seguridad
https://blog.elhacker.net/2016/03/cabeceras-http-opciones-de-seguridad-hardering-en-el-servidor-web-apache-nginx.html
En línea

Danielㅤ


Desconectado Desconectado

Mensajes: 1.667


🔵🔵🔵🔵🔵🔵🔵


Ver Perfil
Re: Modificar controles dominio remoto
« Respuesta #6 en: 22 Septiembre 2022, 22:22 pm »

Hola, además de las cabeceras de protección como bien nos comenta el compañero el-brujo, también existen funciones en PHP para sanitizar datos.


Saludos
En línea

Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: Modificar controles dominio remoto
« Respuesta #7 en: 23 Septiembre 2022, 12:13 pm »

Buenas,

mucha seguridad no tiene, porque fuera del desarrollo web, a nivel programación lo puedo hacer tranquilamente sin problemas y por el tema de ataques se pueden hacer de mil maneras, hay cosas que son infrenables.

No sé que es SSRF pero lo voy a buscar, gracias por la info.

Como vi que no tenía mucho futuro éso lo hice en VB6, fácil y rápido.

Desde ya muchas gracias a todos, saludos!
En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines