Stay away from the internet - securiting modern infrastructure
A run through three topics relevant to securing and reducing the attack surface area for modern web infrastructure. Talk of network complexity, SDN, end user device security, spearphishing, unikernels and more.
subrequest, passing the request body res = ngx.location.capture( "/request", { method = ngx.HTTP_POST, body = ngx.var.request_body } ) -- if the subrequest errors if res.status == ngx.HTTP_OK then else ngx.status = ngx.HTTP_BAD_REQUEST ngx.say("invalid request") return end -- if we have a valid request, decode response as JSON local success, response = pcall(cjson.decode, res.body) if success then -- if valid JSON just pass through the response Nginx supports Lua and JS extensions, HAProxy supports Lua
expect(@open_ports.count).to eq(3) end it 'exposes a web server' do expect(@open_ports).to include('80/tcp') expect(@open_ports).to include('443/tcp') end it 'exposes an SSH server' do expect(@open_ports).to include('22/tcp') end it 'rejects email traffic' do expect(@closed_ports).to include('25/tcp') end Using any unit testing framework we can make explicit assertions against our network
ports (FAILED - 3) exposes a web server exposes an SSH server rejects accept email traffic (FAILED - 4) Anyone can run the tests and understand what is expected and what is currently broken
iniface => '! lo', proto => 'all', destination => '127.0.0.1/8', action => 'reject', } Necessary but not sufficient. Still requires domain knowledge and lots of context.
Runtime Application Container runtime Container Operating system Runtime Application Container Even more OS Runtime Application Lots and lots of containers in fact