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
Jetpack Compose メカニズム
skydoves
0
300
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
180
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
220
Family mrubyの進捗
kishima
1
110
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
240
業務時間外もAIに働いてもらう話
colorful12
3
10k
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
440
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
150
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
スマート反転とウェブアクセシビリティ
camiha
0
200
Security issues being discussed on Web Platforms
petamoriken
0
860
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
150
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
A Soul's Torment
seathinner
7
3.6k
Agile that works and the tools we love
rasmusluckow
331
22k
How GitHub (no longer) Works
holman
316
150k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Marketing to machines
jonoalderson
1
5.8k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Music & Morning Musume
bryan
47
7.4k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
580
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