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
Alex
February 08, 2015
Programming
0
74
Ya no se juega al veo veo
Alex
February 08, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
220
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
360
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
780
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
770
レベル1の開発生産性向上に取り組む − 日々の作業の効率化・自動化を通じた改善活動
kesoji
0
220
Porting a visionOS App to Android XR
akkeylab
0
470
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
170
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
640
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
87
29k
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
130
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
160
Goで作る、開発・CI環境
sin392
0
230
Featured
See All Featured
Visualization
eitanlees
146
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Why Our Code Smells
bkeepers
PRO
336
57k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Practical Orchestrator
shlominoach
189
11k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
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