Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ya no se juega al veo veo
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Alex
February 08, 2015
Programming
93
0
Share
Ya no se juega al veo veo
Alex
February 08, 2015
Other Decks in Programming
See All in Programming
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
3
400
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
110
【ディップ|26年新卒研修資料】TDD実装演習
dip_tech
PRO
0
190
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
23
13k
書き換えて学ぶTemporal #fukts
pirosikick
2
380
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.3k
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
190
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
3
430
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
110
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.6k
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
120
Featured
See All Featured
We Are The Robots
honzajavorek
0
230
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Designing for humans not robots
tammielis
254
26k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
260
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
540
Crafting Experiences
bethany
1
150
Transcript
Alejandro Morais Ya no se juega al veo veo Except
where otherwise noted, this work is licensed under: http://creativecommons.org/licenses/by-nc-sa/3.0/ Leganés 12-13 Febrero 2015
2 • Introducción • Técnicas de Ofuscación en Javascript •
Herramientas • Problemas con streaming de música, videos… • Posibles Soluciones • Conclusión (Es decir, un mejunje JS + Agenda
3 Bienvenido s
4 Y….
5
Aburrido…
¡¡Series!!
Seriesly antes molaba
Publicidad, publicidad, publicidad Hemos picado todos…
• Publicidad Y • Reproductor JWPlayer
Todo el mundo quiere a JWPlayer
Hmm… ¿Seguridad?
Probemos…
Chrome -> Inspect -> “file: **”
Automatizando… (Con PHP, claro)
Froxy
Pero no todo es un camino de piruletas
Cachis… ¿eval? ¿packed?
Ofuscando
Ofuscando: Técnicas • Minimizar • Como funciona eval() • ASCII
• Unicode • XOR • Split de Strings • Packed • Encriptado Simple • Técnicas Avanzadas
Warning Antes de empezar a ofuscar código siempre hay que
hacer una o varias copias del original (siempre se pierden las copias)
• Minimizar Ofuscando: Técnicas • Uso de variables con longitudes
más cortas • Eliminación de espacios y tabs
• Minimizar Ofuscando: Técnicas Twitter: https://abs.twimg.com/c/swift/es/bundle/fro ntpage...js 269 KB ->
compresión (solo espacios) -> 196 KB ¡¡ Ahorro del 27.2 % !! (Con variables ~ 30%)
• Cómo funciona Eval() Ofuscando: Técnicas Pero se sigue viendo
el código directamente… Hmm…
• ASCII Ofuscando: Técnicas
• Unicode Ofuscando: Técnicas
• XOR (ASCII) Ofuscando: Técnicas Clave: 173 xor_str(“var a =
…”); Misma función, encripta y desencripta
• XOR (Character Encoding) Ofuscando: Técnicas Clave: 173 Misma función,
encripta y desencripta xor_str(“var a = …”);
• Split de Strings Ofuscando: Técnicas Un poco cutre
Ofuscando: Técnicas • Packed
• Encriptado Simple Ofuscando: Técnicas La encriptación es fuerte en
el algoritmo o en la contraseña
• Técnica del “Espacio en blanco” Ofuscando: Técnicas Usar “document”
o “eval”, canta mucho… Lo mismo hacemos con “getElementById”, “innerHtml”,…
• Técnica del “Espacio en blanco” Ofuscando: Técnicas
• Técnica del “Espacio en blanco” Ofuscando: Técnicas El código
original están en el código que desofusca
Un poco de tabulación…
Eval fuera
Variables “e” y “d” no se usan “c.toString(a)” => Convierte
“c” en base “a” Por lo tanto base “36”
Resultado
Automatizando…
https://github.com /alxhotel/unpack-js
Herramientas • UglifyJS https://github.com/mishoo/UglifyJS • Jscrambler https://jscrambler.com/es/ • YuiCompressor http://yui.github.io/yuicompressor/
• Jsbeautifier http://jsbeautifier.org/
Volviendo al streaming…
Los videos están al alcance de un copy paste
Pero esto son casos aislados… ¿no?
Buscando…
Caso Grooveshark • “Session”: valor de la cookie • “Uuid”:
buscamos en JS • “Token”: buscamos en JS JS minimizado. Hmm…
Caso Grooveshark El veo veo hardcore: 1. Ctrl + F
2. Buscar palabra clave 3. Probar 4. Si no funciona vuelve al 1.
Caso Grooveshark • “Uuid”: encontrado en app.min.js • “Token”: de
la peticion getCommunicationToken JS minimizado no tiene “protección”
Algo falla… Necesitamos Seguridad
Posible Soluciones • Token / URLs Firmadas • Encriptación AES
• DRM (~ AES) • Bloquear por localización • Marcas de Agua • Limitar Velocidad
Netflix
Conclusión
Da igual
En streaming todavía tenemos medidas de seguridad
Pero… Seguimos teniendo que desencriptar el archivo en nuestro ordenador
P2P
La ofuscación es útil cuando se usa una combinación de
técnicas
Pero… No debería ser el muro de seguridad sino una
capa más
Ya no se juega al veo veo
Gracias Twitter: @alxhotel Linkedin: /in/alexmorais Github: @alxhotel