Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

251
Vistas
Reemplazar buffer en Frida usando JS

Con Frida imprimo el SSL_write

 Interceptor.attach(Module.findExportByName("libssl.so", "SSL_write"), { onEnter: function (args) { console.log(args[1].readByteArray(args[2].toInt32())); } });

Quiero reemplazar el búfer para escribir en SSL, si el búfer contiene Ascii de AAAAAA , reemplácelo con BBBBBB

Cómo puedo hacer eso ?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Pasos:

  1. Asigne un Uint8Array con el mismo tamaño que recibe la función (puede verificar el argumento size_t)
  2. Copie el búfer original en nuestro recién asignado.
  3. Realice las operaciones requeridas (directamente en ArrayBuffer o conviértalo como una cadena de ida y vuelta).
  4. Obtenga un puntero al primer elemento de nuestro búfer recién asignado llamando a .unwrap() .
 const sslWritePtr = Module.getExportByName(null, "ssl_write"); function str2ab(str) { let buf = new ArrayBuffer(str.length); let bufView = new Uint8Array(buf); for (var i=0, strLen=str.length; i < strLen; i++) { bufView[i] = str.charCodeAt(i); } return buf; } Interceptor.attach(sslWritePtr, { onEnter: function (args) { // Get the buffer size by checking the third argument. const buffer_size = args[2].toInt32() + 1; // Read the contents of the buffer and get an ArrayBuffer. let buffer = args[1].readByteArray(buffer_size); // Convert it to a string object. let buffer_string = String.fromCharCode.apply(null, new Uint8Array(buffer)); // Replace the contents. buffer_string = buffer_string.replace("AAAAAA", "BBBBBB"); // Convert `buffer_string` back to an ArrayBuffer. // .unwrap() returns a pointer to the first element of the Uint8Array args[1] = str2ab(str).unwrap(); // Assign the pointer of our new Uint8Array. }, });

Este enlace puede ser útil para comprender mejor cómo operar en esta situación: https://learnfrida.info/intermediate_usage/#operating-with-arraybuffers

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda