SlideShare una empresa de Scribd logo
1 de 24
1
EV1 SHA
Misadventures in the land of Lua
Hi. I’m Adam.
@adam_baldwin
&
&
2.6
REDIS LUA ENV IN
_G.__redis__compare_helper()      coroutine.status()     math.frexp()            redis.log()        ARGV
_G.assert()                       coroutine.wrap()       math.ldexp()            redis.pcall()      KEYS
_G.collectgarbage()               coroutine.yield()      math.log()              redis.sha1hex()    select
_G.getfenv()                      debug.debug()          math.log10()            string.byte()      gcinfo
_G.getmetatable()                 debug.getfenv()        math.max()              string.char()      pairs
_G.newproxy()                     debug.gethook()        math.min()              string.dump()      rawget
_G.next()                         debug.getinfo()        math.mod()              string.find()       loadstring
_G.pcall()                        debug.getlocal()       math.modf()             string.format()    ipairs
_G.print()                        debug.getmetatable()   math.pow()              string.gfind()      dofile
_G.rawequal()                     debug.getregistry()    math.rad()              string.gmatch()    setfenv
_G.rawset()                       debug.getupvalue()     math.random()           string.gsub()      load
_G.setmetatable()                 debug.setfenv()        math.randomseed()       string.len()       error
_G.tonumber()                     debug.sethook()        math.sin()              string.lower()
_G.tostring()                     debug.setlocal()       math.sinh()             string.match()
_G.type()                         debug.setmetatable()   math.sqrt()             string.rep()
_G.unpack()                       debug.setupvalue()     math.tan()              string.reverse()
_G.xpcall()                       debug.traceback()      math.tanh()             string.sub()
cjson.decode()                    math.abs()             redis.LOG_DEBUG         string.upper()
cjson.encode()                    math.acos()            redis.LOG_NOTICE        struct.pack()
cjson.encode_keep_buffer()        math.asin()            redis.LOG_VERBOSE       struct.unpack()
cjson.encode_max_depth()          math.atan()            redis.LOG_WARNING       table.concat()
cjson.encode_number_precision()   math.atan2()           cmsgpack._COPYRIGHT     table.foreach()
cjson.encode_sparse_array()       math.ceil()            cmsgpack._DESCRIPTION   table.foreachi()
cjson.refuse_invalid_numbers()    math.cos()             _VERSION                table.getn()
cmsgpack.pack()                   math.cosh()            math.huge               table.insert()
cmsgpack.unpack()                 math.deg()             cjson.null              table.maxn()
coroutine.create()                math.exp()             math.pi                 table.remove()
coroutine.resume()                math.floor()            cjson.version           table.setn()
coroutine.running()               math.fmod()            redis.call()            table.sort()
Available Lua
https://gist.github.com/3924845
redis.sh
REDIS-SHA-
https://github.com/evilpacket/redis-sha-crack
2   6
1805!
111   |   Version   2.4.8
105   |   Version   2.4.15
102   |   Version   2.4.17
 96   |   Version   2.2.12
 93   |   Version   2.4.10
 75   |   Version   2.4.16
 74   |   Version   2.4.14
 65   |   Version   2.4.13
 51   |   Version   2.2.11
 46   |   Version   2.4.2
bind
bind
Pure Lua MD5
https://gist.github.com/3647908
loadfile()
dofile()
debug.d
</
PRESENTATION
@adam_baldwin

Más contenido relacionado

Más de Adam Baldwin

Hunting for malicious modules in npm - NodeSummit
Hunting for malicious modules in npm - NodeSummitHunting for malicious modules in npm - NodeSummit
Hunting for malicious modules in npm - NodeSummitAdam Baldwin
 
Continuous Security - Thunderplains 2016
Continuous Security - Thunderplains 2016Continuous Security - Thunderplains 2016
Continuous Security - Thunderplains 2016Adam Baldwin
 
Continuous Security
Continuous SecurityContinuous Security
Continuous SecurityAdam Baldwin
 
The Art of Identifying Vulnerabilities - CascadiaFest 2015
The Art of Identifying Vulnerabilities  - CascadiaFest 2015The Art of Identifying Vulnerabilities  - CascadiaFest 2015
The Art of Identifying Vulnerabilities - CascadiaFest 2015Adam Baldwin
 
Node Day - Node.js Security in the Enterprise
Node Day - Node.js Security in the EnterpriseNode Day - Node.js Security in the Enterprise
Node Day - Node.js Security in the EnterpriseAdam Baldwin
 
Node Security Project - LXJS 2013
Node Security Project - LXJS 2013Node Security Project - LXJS 2013
Node Security Project - LXJS 2013Adam Baldwin
 
Security First - Adam Baldwin
Security First - Adam BaldwinSecurity First - Adam Baldwin
Security First - Adam BaldwinAdam Baldwin
 
JSConf 2013 Builders vs Breakers
JSConf 2013 Builders vs BreakersJSConf 2013 Builders vs Breakers
JSConf 2013 Builders vs BreakersAdam Baldwin
 
Writing an (in)secure webapp in 3 easy steps
Writing an (in)secure webapp in 3 easy stepsWriting an (in)secure webapp in 3 easy steps
Writing an (in)secure webapp in 3 easy stepsAdam Baldwin
 
Pony Pwning Djangocon 2010
Pony Pwning Djangocon 2010Pony Pwning Djangocon 2010
Pony Pwning Djangocon 2010Adam Baldwin
 

Más de Adam Baldwin (11)

Hunting for malicious modules in npm - NodeSummit
Hunting for malicious modules in npm - NodeSummitHunting for malicious modules in npm - NodeSummit
Hunting for malicious modules in npm - NodeSummit
 
Continuous Security - Thunderplains 2016
Continuous Security - Thunderplains 2016Continuous Security - Thunderplains 2016
Continuous Security - Thunderplains 2016
 
Continuous Security
Continuous SecurityContinuous Security
Continuous Security
 
Nodevember 2015
Nodevember 2015Nodevember 2015
Nodevember 2015
 
The Art of Identifying Vulnerabilities - CascadiaFest 2015
The Art of Identifying Vulnerabilities  - CascadiaFest 2015The Art of Identifying Vulnerabilities  - CascadiaFest 2015
The Art of Identifying Vulnerabilities - CascadiaFest 2015
 
Node Day - Node.js Security in the Enterprise
Node Day - Node.js Security in the EnterpriseNode Day - Node.js Security in the Enterprise
Node Day - Node.js Security in the Enterprise
 
Node Security Project - LXJS 2013
Node Security Project - LXJS 2013Node Security Project - LXJS 2013
Node Security Project - LXJS 2013
 
Security First - Adam Baldwin
Security First - Adam BaldwinSecurity First - Adam Baldwin
Security First - Adam Baldwin
 
JSConf 2013 Builders vs Breakers
JSConf 2013 Builders vs BreakersJSConf 2013 Builders vs Breakers
JSConf 2013 Builders vs Breakers
 
Writing an (in)secure webapp in 3 easy steps
Writing an (in)secure webapp in 3 easy stepsWriting an (in)secure webapp in 3 easy steps
Writing an (in)secure webapp in 3 easy steps
 
Pony Pwning Djangocon 2010
Pony Pwning Djangocon 2010Pony Pwning Djangocon 2010
Pony Pwning Djangocon 2010
 

EV1LSHA - Misadventures in the land of Lua

  • 1. 1 EV1 SHA Misadventures in the land of Lua
  • 3.
  • 5.
  • 6. &
  • 7. &
  • 8.
  • 9.
  • 10. 2.6
  • 11. REDIS LUA ENV IN _G.__redis__compare_helper() coroutine.status() math.frexp() redis.log() ARGV _G.assert() coroutine.wrap() math.ldexp() redis.pcall() KEYS _G.collectgarbage() coroutine.yield() math.log() redis.sha1hex() select _G.getfenv() debug.debug() math.log10() string.byte() gcinfo _G.getmetatable() debug.getfenv() math.max() string.char() pairs _G.newproxy() debug.gethook() math.min() string.dump() rawget _G.next() debug.getinfo() math.mod() string.find() loadstring _G.pcall() debug.getlocal() math.modf() string.format() ipairs _G.print() debug.getmetatable() math.pow() string.gfind() dofile _G.rawequal() debug.getregistry() math.rad() string.gmatch() setfenv _G.rawset() debug.getupvalue() math.random() string.gsub() load _G.setmetatable() debug.setfenv() math.randomseed() string.len() error _G.tonumber() debug.sethook() math.sin() string.lower() _G.tostring() debug.setlocal() math.sinh() string.match() _G.type() debug.setmetatable() math.sqrt() string.rep() _G.unpack() debug.setupvalue() math.tan() string.reverse() _G.xpcall() debug.traceback() math.tanh() string.sub() cjson.decode() math.abs() redis.LOG_DEBUG string.upper() cjson.encode() math.acos() redis.LOG_NOTICE struct.pack() cjson.encode_keep_buffer() math.asin() redis.LOG_VERBOSE struct.unpack() cjson.encode_max_depth() math.atan() redis.LOG_WARNING table.concat() cjson.encode_number_precision() math.atan2() cmsgpack._COPYRIGHT table.foreach() cjson.encode_sparse_array() math.ceil() cmsgpack._DESCRIPTION table.foreachi() cjson.refuse_invalid_numbers() math.cos() _VERSION table.getn() cmsgpack.pack() math.cosh() math.huge table.insert() cmsgpack.unpack() math.deg() cjson.null table.maxn() coroutine.create() math.exp() math.pi table.remove() coroutine.resume() math.floor() cjson.version table.setn() coroutine.running() math.fmod() redis.call() table.sort()
  • 13.
  • 16. 2 6
  • 17. 1805!
  • 18. 111 | Version 2.4.8 105 | Version 2.4.15 102 | Version 2.4.17 96 | Version 2.2.12 93 | Version 2.4.10 75 | Version 2.4.16 74 | Version 2.4.14 65 | Version 2.4.13 51 | Version 2.2.11 46 | Version 2.4.2
  • 19. bind
  • 20. bind
  • 21.

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n