Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Secure your Web Application
Search
Dheeraj Joshi
July 16, 2016
Technology
0
6.6k
Secure your Web Application
Slides from my talk at JSChannel Conference 2016
Dheeraj Joshi
July 16, 2016
Tweet
Share
More Decks by Dheeraj Joshi
See All by Dheeraj Joshi
Beyond Scanning
djadmin
0
480
Let's talk Security
djadmin
0
7.6k
Other Decks in Technology
See All in Technology
Ultra Ethernet (UEC) v1.0 仕様概説
markunet
3
200
白金鉱業Meetup_Vol.22_Orbital Senseを支える衛星画像のマルチモーダルエンベディングと地理空間のあいまい検索技術
brainpadpr
2
200
Exadata Fleet Update
oracle4engineer
PRO
0
1.3k
プロジェクトマネジメントをチームに宿す -ゼロからはじめるチームプロジェクトマネジメントは活動1年未満のチームの教科書です- / 20260304 Shigeki Morizane
shift_evolve
PRO
1
110
AIエンジニア Devin と歩む、自律型運用プロセスの構築
a2ito
0
680
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
1.6k
製造業ドメインにおける LLMプロダクト構築: 複雑な文脈へのアプローチ
caddi_eng
1
450
EMからICへ、二周目人材としてAI全振りのプロダクト開発で見つけた武器
yug1224
3
390
OCI Security サービス 概要
oracle4engineer
PRO
2
13k
Kaggleの経験が実務にどう活きているか / kaggle_findy
sansan_randd
4
730
どこで打鍵するのが良い? IaCの実行基盤選定について
nrinetcom
PRO
2
170
【SLO】"多様な期待値" と向き合ってみた
z63d
2
310
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
210
Google's AI Overviews - The New Search
badams
0
930
Unsuck your backbone
ammeep
672
58k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
370
The Invisible Side of Design
smashingmag
302
51k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
810
BBQ
matthewcrist
89
10k
Typedesign – Prime Four
hannesfritz
42
3k
エンジニアに許された特別な時間の終わり
watany
106
240k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
200
Transcript
Let’s talk Security Secure your Web Application - Best Practices
Dheeraj Joshi @dheerajhere
• Front-End @ • Previously @ • Open Source (medium-cli)
• Ambidextrous TT Player About Me
More... I wear White Hat. Uber, CKEditor, Dropbox, MailChimp, Recruiterbox,
InVision, DigitalOcean, Intuit, Groupon, etc. What makes me happy?
Agenda • Why ? • Cross-site Scripting (XSS) • Cross-site
Request Forgery (CSRF) • Content Security Policy (CSP) • Useful Headers • Other Best Practices • Live Demo
Why should Startups Care about Security? Startups & SMEs are
known to cut corners. One of the first things they cut is ‘Security'.
None
Github Reused password attack
HACKER PUTS HOSTING SERVICE “CODE SPACES” OUT OF BUSINESS The
Shutdown
CROSS SITE SCRIPTING - XSS • XSS attack users •
“Javascript Injection” • Exploits can be bad, really bad..
What is XSS? Typical Reflected XSS
Stored XSS
DOM XSS
Protect Yourself • Input Validation • Ensure that outputs are
HTML encoded • Don’t reinvent the wheel (Use proven sanitizers) • Analyze places where DOM elements are created
ngBind attribute $sanitize - service in module ngSanitize Sanitizes an
html string by stripping all potentially dangerous tokens.
• Add HTTPOnly, Secure attributes on Session Cookie
CROSS-SITE REQUEST FORGERY (CSRF)
Because the attack is carried out by the victim, CSRF
can bypass: • HTTP Auth • Session-based auth • Firewalls CSRF Attacks
Prevention
• Only accepting POST requests • Referer Protection • Multi-Step
Transactions • URL Rewriting • application/json “CSRF Myths” Preventions that Won’t work
XSS + CSRF =
Content Security Policy (CSP)
List of useful HTTP headers • Strict-Transport-Security: max-age=16070400; includeSubDomains •
X-Frame-Options: deny • X-XSS-Protection: 1; mode=block
Prevent Information Disclosure Hide X-Powered-By Or try this ;)
Target=”_blank” • Access `window.opener`. • Fix `rel=noopener`. (Firefox : rel=noreferrer)
• window.opener = null;
How to improve ? • SECURITY.md • Security audits •
Discuss Vulnerabilities
Show Time !
Thank you @dheerajhere @djadmin