Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ya no se juega al veo veo
Search
Alex
February 08, 2015
Programming
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ya no se juega al veo veo
Alex
February 08, 2015
Other Decks in Programming
See All in Programming
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
160
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
650
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2k
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
270
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
500
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
710
What We Talk About When We Talk About XP
m_seki
2
660
The Rails Doctrine Decade
koic
2
170
Building an Out-of-Order CPU
latte72
1
790
App Intentsのビルドプロセスを支える技術
kntkymt
0
410
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
2.2k
Featured
See All Featured
Accessibility Awareness
sabderemane
1
210
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
A Modern Web Designer's Workflow
chriscoyier
699
190k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Navigating Weather and Climate Data
rabernat
0
520
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Discover your Explorer Soul
emna__ayadi
2
1.3k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
280
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
First, design no harm
axbom
PRO
2
1.3k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
It's Worth the Effort
3n
188
29k
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