Escapar de los fallos de seguridad

Rate this content
Bookmark

Un discurso de venta para la seguridad - ¡genial! Lo sé, la seguridad a menudo es frustrante o incluso molesta. Pero todos trabajamos en tecnología y en algún momento, la seguridad siempre se convierte en un tema. Descubramos un fallo de seguridad del mundo real y lo que podemos aprender de él para prevenir tales incidentes. Va a ser divertido, lo prometo.

Henrik Fricke
Henrik Fricke
7 min
08 Dec, 2023

Video Summary and Transcription

La charla discute sobre la seguridad web y la importancia de una fuerte protección del código. Destaca una vulnerabilidad donde se utilizó un débil código numérico de cinco dígitos, permitiendo un fácil acceso a contenido sensible. El orador enfatiza la necesidad de la limitación como mecanismo para prevenir ataques. La empresa implementó la limitación y bloqueó el acceso a las fotos para mejorar la seguridad. Sin embargo, se necesita un código más fuerte y medidas adicionales, como limitar el acceso a direcciones IP específicas y marcos de tiempo.

Available in English

1. Introducción a la Seguridad Web

Short description:

Hola, mi nombre es Hendrik. Hoy, quiero hablar sobre la seguridad web. Accedí accidentalmente a contenido picante debido a una débil protección de código. Se utilizó un código numérico de cinco dígitos, lo que facilitó la generación de códigos. El throttling es un mecanismo importante para prevenir ataques, pero no se implementó.

Entonces, hola, mi nombre es Hendrik. Y antes de empezar, necesito decepcionarte un poco porque no voy a hablar sobre React hoy. Y aún peor, quiero hablar sobre la seguridad web. Así que espero que puedas disfrutar de mi charla.

Quiero contar una historia o compartir una historia contigo donde accidentalmente, y prometo accidentalmente, accedí a contenido bastante picante de fotos donde la gente mostraba juguetes sexuales o incluso consumía alcohol. ¿Qué ha pasado? Bueno, en octubre de 2022, visité una sala de escape con algunos amigos. Y después de la experiencia, un miembro del personal vino a nosotros e hizo una foto de grupo.

En nuestro caso, solo fue una aburrida foto de grupo. Y después de eso, nos dieron un pequeño pedazo de papel que parecía eso. Y en el pedazo de papel, estaba nuestro código generado aleatoriamente, así como la fecha de la experiencia, ¿verdad? La experiencia fue muy útil. Solo tenías que ir a la página web, ingresar tu código y boom, puedes encontrar las fotos puedes acceder fácilmente y prestarlas y compartirlas con tus amigos. Gran experiencia de usuario. ¿Qué podría salir mal aquí?

Bueno, es como quizás similar al gato, ¿verdad? Imagina que tienes una habitación y quieres proteger la habitación. Entonces la solución es, bueno, simplemente cierras la puerta y tu habitación está segura, ¿verdad? Hasta que el gato entiende cómo usar la manija de la puerta. Volviendo a mi historia, básicamente, yo era el gato y estaba jugando con la manija de la puerta para ver cómo funciona. Resulta que, en realidad, usaron un código bastante débil para proteger las fotos, ¿verdad? Era un código numérico de cinco dígitos, lo que significa que solo teníamos 90,000 códigos posibles por día. Y estoy bastante seguro de que cualquiera de ustedes podría escribir fácilmente un script para generar códigos. Y lo único que tienes que hacer es simplemente escribir otro script y enviar el formulario una y otra vez, y solo esperar encontrar un código real. Sí, tal vez eso es lo que hice. Y resulta que funciona. Y solo como una rápida comparación, puedes verlo aquí en la tabla. Si simplemente usas un código numérico de seis dígitos, ya aumentarías la complejidad a 900,000 códigos. Y para mí, siempre es como, piénsalo. Si te sentaras en nuestra reunión de diseño de productos, en algún momento tendrías que decidir, está bien, ¿qué tipo de código vamos a usar? Y eligieron uno numérico de cinco dígitos. Imagina si hubieran elegido el de seis dígitos o incluso incluido alfanumérico, habrían aumentado la complejidad bastante.

Entonces, incluso si tienes el código más fuerte del mundo, si me das suficiente computación, probablemente dinero y tiempo, todavía podría intentar encontrar códigos aleatorios. Por lo tanto, otro mecanismo que necesitamos es el throttling. El throttling significa que si recibes mucho tráfico proveniente de la misma dirección IP, probablemente en algún momento quieras limitar el tráfico o bloquear la dirección IP por completo. Y ese es un mecanismo bastante fuerte para prevenir ataques. ¿Y adivina qué? No implementaron ningún throttling.

2. Mejorando las Medidas de Seguridad

Short description:

No había puerta ni manija de la puerta, lo que hacía que la habitación fuera fácilmente accesible. Después de descubrir contenido sensible, compartí mis hallazgos con la empresa. Implementaron el throttling y bloquearon el acceso a las fotos, mejorando la seguridad. Sin embargo, todavía se necesita un código más fuerte. Ahora el tráfico debe provenir de diferentes direcciones IP y el acceso a las fotos está limitado a un marco de tiempo específico.

Básicamente, eso significa que no había puerta, no había manija de la puerta, básicamente la habitación estaba abierta y yo podía entrar sin ningún problema. Bueno, estaba aburrido un domingo y me di cuenta de que, oh, diablos, esto es realmente serio aquí. Y también mencioné que encontré contenido picante porque, eso es porque también tienen una experiencia de sala de escape de fiesta donde puedes tener algunos momentos íntimos privados con tus amigos. Y básicamente con el resto del mundo, ¿verdad? Así que pensé, está bien, necesito compartir mis hallazgos de alguna manera con la empresa. Y eso es lo que hice. Y un par de semanas después, reaccionaron. Al menos implementaron el throttling y también bloquearon el acceso a todas las fotos. Así que mejoraron un poco la security. Aún así, todavía sugeriría implementar un código más fuerte, pero al menos ahora es más difícil atacar el servicio porque ahora el tráfico tendría que provenir de diferentes direcciones IP. Y también solo puedes obtener acceso a las fotos de los últimos 14 días, 7 días, no sé el número exacto. Así que definitivamente lo mejoraron. Entonces, ¿por qué estoy aquí? Para mí, no es que quiera culpar a la empresa, ¿verdad? Todos cometemos errores. Y estoy bastante seguro de que en mis criterios, también implementé algunas cosas bastante malas. Así que no se trata de culpar. Se trata de aprender e inspirar a las personas. Y así quiero inspirar a cada uno de ustedes aquí para desafiar las decisiones de design. Así que imagina que estás en una reunión de diseño de producto, tienes que implementar un servicio de fotos o un servicio de compartición. Y solo me gustaría inspirarte para hacer preguntas críticas aquí, como estas que están en la diapositiva. Habría sido tan fácil prevenir un ataque simplemente implementando un código más fuerte, implementando el throttling, también bloqueando el acceso a fotos más antiguas, o incluso haciendo preguntas. Oye, ¿podemos simplemente comprar un producto SaaS para manejar las cosas aquí? ¿Tenemos que implementarlo nosotros mismos? O tal vez podemos reutilizar la dirección de correo electrónico de la reserva en línea para que ni siquiera necesitemos generar un código. Y sin mencionar, pusieron credenciales duras en un pedazo de papel. No sé si eso es realmente una buena solución. Así que solo quiero inspirar a cada uno de ustedes a desafiar las decisiones de design para que podamos todos trabajar en una web segura. Ese es mi tiempo. Esa es mi charla relámpago de hoy. Puedes encontrar todas mis redes sociales y también dirección de correo electrónico, si no te gustan las redes sociales, en mi sitio web. Les deseo a todos un gran resto de la conferencia y nos vemos tal vez más tarde en la fiesta.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Node Congress 2022Node Congress 2022
26 min
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Top Content
Do you know what’s really going on in your node_modules folder? Software supply chain attacks have exploded over the past 12 months and they’re only accelerating in 2022 and beyond. We’ll dive into examples of recent supply chain attacks and what concrete steps you can take to protect your team from this emerging threat.
You can check the slides for Feross' talk here.
The State of Passwordless Auth on the Web
JSNation 2023JSNation 2023
30 min
The State of Passwordless Auth on the Web
Can we get rid of passwords yet? They make for a poor user experience and users are notoriously bad with them. The advent of WebAuthn has brought a passwordless world closer, but where do we really stand?
In this talk we'll explore the current user experience of WebAuthn and the requirements a user has to fulfill for them to authenticate without a password. We'll also explore the fallbacks and safeguards we can use to make the password experience better and more secure. By the end of the session you'll have a vision for how authentication could look in the future and a blueprint for how to build the best auth experience today.
Let Me Show You How React Applications Get Hacked in the Real-World
React Advanced Conference 2021React Advanced Conference 2021
22 min
Let Me Show You How React Applications Get Hacked in the Real-World
Top Content
Modern frontend frameworks like React are well thought-of in their application security design and that’s great. However, there is still plenty of room for developers to make mistakes and use insecure APIs, vulnerable components, or generally do the wrong thing that turns user input into a Cross-site Scripting vulnerability (XSS). Let me show you how React applications get hacked in the real-world.
5 Ways You Could Have Hacked Node.js
JSNation 2023JSNation 2023
22 min
5 Ways You Could Have Hacked Node.js
All languages are or were vulnerable to some kind of threat. I’m part of the Node.js Security team and during the year 2022, we've performed many Security Releases and some of them were really hard to think about.
Did you know you can make money by finding critical vulnerabilities in Node.js? In this talk, I’ll show you 5 ways you can have hacked Node.js and how the Node.js team deals with vulnerabilities.
How React Applications Get Hacked in the Real-World
React Summit 2022React Summit 2022
7 min
How React Applications Get Hacked in the Real-World
React has a great security standard as default, but if you don’t pay close attention to the details you could get burned by some of the escape hatches APIs, or even by just passing props insecurely to components. I’ll teach you how to avoid these pitfalls.
Securing Node.js APIs with Decentralised Identity Tokens
JSNation Live 2021JSNation Live 2021
9 min
Securing Node.js APIs with Decentralised Identity Tokens
Authentication and Authorization are serious problems. We often dedicate a lot of time to craft powerful APIs but overlook proper security measures. Let's solve it with Magic using a key-based identity solution built on top of DID standard, where users’ identities are self-sovereign leveraging blockchain public-private key pairs. In this talk, we’ll look at proper ways to secure our Node.js APIs with Decentralised Identity Tokens. We’ll go from learning what Decentralised Identity standards are, how the users’ identities are self-sovereign leveraging blockchain public-private key pairs, why they’re the future of API security, and to put theory into practice we will build a real-world implementation using Node.js where I’ll show common best practices.

Workshops on related topic

0 to Auth in an hour with ReactJS
React Summit 2023React Summit 2023
56 min
0 to Auth in an hour with ReactJS
WorkshopFree
Kevin Gao
Kevin Gao
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool. There are multiple alternatives that are much better than passwords to identify and authenticate your users - including SSO, SAML, OAuth, Magic Links, One-Time Passwords, and Authenticator Apps.
While addressing security aspects and avoiding common pitfalls, we will enhance a full-stack JS application (Node.js backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session securely for subsequent client requests, validating / refreshing sessions- Basic Authorization - extracting and validating claims from the session token JWT and handling authorization in backend flows
At the end of the workshop, we will also touch other approaches of authentication implementation with Descope - using frontend or backend SDKs.
Finding, Hacking and fixing your NodeJS Vulnerabilities with Snyk
JSNation 2022JSNation 2022
99 min
Finding, Hacking and fixing your NodeJS Vulnerabilities with Snyk
WorkshopFree
Matthew Salmon
Matthew Salmon
npm and security, how much do you know about your dependencies?Hack-along, live hacking of a vulnerable Node app https://github.com/snyk-labs/nodejs-goof, Vulnerabilities from both Open source and written code. Encouraged to download the application and hack along with us.Fixing the issues and an introduction to Snyk with a demo.Open questions.
Bring Code Quality and Security to your CI/CD pipeline
DevOps.js Conf 2022DevOps.js Conf 2022
76 min
Bring Code Quality and Security to your CI/CD pipeline
WorkshopFree
Elena Vilchik
Elena Vilchik
In this workshop we will go through all the aspects and stages when integrating your project into Code Quality and Security Ecosystem. We will take a simple web-application as a starting point and create a CI pipeline triggering code quality monitoring for it. We will do a full development cycle starting from coding in the IDE and opening a Pull Request and I will show you how you can control the quality at those stages. At the end of the workshop you will be ready to enable such integration for your own projects.
JS Security Testing Automation for Developers on Every Build
TestJS Summit 2021TestJS Summit 2021
111 min
JS Security Testing Automation for Developers on Every Build
WorkshopFree
Oliver Moradov
Bar Hofesh
2 authors
As a developer, you need to deliver fast, and you simply don't have the time to constantly think about security. Still, if something goes wrong it's your job to fix it, but security testing blocks your automation, creates bottlenecks and just delays releases...but it doesn't have to...

NeuraLegion's developer-first Dynamic Application Security Testing (DAST) scanner enables developers to detect, prioritise and remediate security issues EARLY, on every commit, with NO false positives/alerts, without slowing you down.

Join this workshop to learn different ways developers can access Nexploit & start scanning without leaving the terminal!

We will be going through the set up end-to-end, whilst setting up a pipeline, running security tests and looking at the results.

Table of contents:
- What developer-first DAST (Dynamic Application Security Testing) actually is and how it works
- See where and how a modern, accurate dev-first DAST fits in the CI/CD
- Integrate NeuraLegion's Nexploit scanner with GitHub Actions
- Understand how modern applications, APIs and authentication mechanisms can be tested
- Fork a repo, set up a pipeline, run security tests and look at the results
Passwordless Auth to Servers: hands on with ASA
DevOps.js Conf 2022DevOps.js Conf 2022
32 min
Passwordless Auth to Servers: hands on with ASA
WorkshopFree
E. Dunham
E. Dunham
These days, you don't need a separate password for every website you log into. Yet thanks to tech debt and tradition, many DevOps professionals are still wrangling a host of SSH keys to access the servers where we sometimes need to be. With modern OAuth, a single login and second factor to prove your identity are enough to securely get you into every service that you're authorized to access. What if SSHing into servers was that easy? In this workshop, we'll use Okta's Advanced Server Access tool (formerly ScaleFT) to experience one way that the dream of sending SSH keys the way of the password has been realized.
- we'll discuss how ASA works and when it's the right tool for the job- we'll walk through setting up a free trial Okta account to use ASA from, and configuring the ASA gateway and server on Linux servers- we'll then SSH into our hosts with the ASA clients without needing to supply an SSH key from our laptops- we'll review the audit logs of our SSH sessions to examine what commands were run