SlideShare a Scribd company logo
5 Bare Minimum Things a Web startup CTO MUST worry about Indus Khaitan http://khaitan.org [email_address] Twitter: 1ndus *Not affiliated to any software vendors mentioned in this preso … and implement few basic things to have a good night’s sleep! 18 slides
What are these? Security Availability & Monitoring Application Errors Backup Source Control (in order of decreasing priority)
Security Threats Your website taken over Your database taken over Your server taken over (Distributed) Denial of Service
Prevention of Security Threats Keep your stack up-to-date. Patch. Establish security-aware coding practice Know your Logs! Install open source packages for preventive/reactive treatments Get a hardware firewall (if you are popular and have money) …  Subscribe to Securityfocus alerts
Simple TODO List for You Use logwatch and monitor your logs Make your Database access local (specific IPs only) Secure your sshd  Password-less login, non-default port, no root login Use denyhosts to block dictionary SSH attacks (iptables/netfilter is a good bet, I haven’t tried it) Close all ports except SSH, HTTP/HTTPS Use nmap to see what “hackers” see!
A log snapshot of SSH attack Didn't receive an ident from these IPs: 114.200.199.144: 1 Time(s) Illegal users from: 114.200.199.144: 6 times alias/password: 1 time office/password: 1 time recruit/password: 1 time sales/password: 1 time samba/password: 1 time staff/password: 1 time Failed logins from: 211.60.15.30: 1 time root/password: 1 time 219.137.24.12: 1 time root/password: 1 time
Availability & Monitoring Website, Database, SMTP, DNS were down (now up!) Poor site performance  Application, Network, or hosting provider? CPU, Disk, IO, Memory, Network Interface Server down != website down. Put a load balancer
Monitoring – External sample
Monitoring: Internal System Level Monitoring with Nagios
Simple TODO List for You Do some basic external monitoring  Zoho does url/5minutes at $4/month...cheap! Get Nagios for system monitoring Use Load Balancer to prevent single server failure HTTP, Load Balanced database reads
Application Errors Bad Code function validate($key) { global $weblog ; if (empty($key)) { $errorlog->error( "Error : In function validate site key"); return FALSE; }else{ return TRUE; } } Leads to this in phperror log [13-Feb-2009 09:41:32] PHP Fatal error:  Call to a member function error() on a non-object in /home/padmin/public_html/util/functions.php on line 4
Application Errors Simple WARNINGS/FATALs lead to bigger problems eg. INSERT failed because of duplicate key (was always inserting 0 for the parameter!) Apache error_log may show wrong configuration Database logs may show a crash (and auto-recovery!)
Simple TODO for You Use a logger like log4j/log4PHP Modify the handler to send a real-time email of a desired error level Look for Database Error logs, Apache error logs – They will tell you a story! Borrow from Security: Use logwatch package Review your own application codebase
Backup Backup before disaster strikes Database backups Do a dry run of recovery at least once Ensure consistent, online backups Backup your production directories
Simple TODO For You (mysql) Use a slave for a consistent backup. No slave? Then Lock the master before dumping Take a backup tar of production Preferably backed up every week, and just before a deployment and just after a deployment Use S3 to store the files remotely
Source Control: Simple TODO For You Use SVN Use hosted… DevGuard..$7/month..cheap! Few Developers? Can’t do Linux? No money? Use a local SVN server on Windows. Woorrks! But back-it-up!!! Have a prod. deployment strategy From SVN, DON’T deploy directly on Prod., use a separate instance and then scp/rsync over
Summary Know Your Logs! Be Security aware Lock your SSH. Close Open Ports Do some basic external monitoring Backup your Database & prod directory onto a remote location Use SVN
Sample Advanced Topics & Thanks! Incremental backups, snapshots Monitoring Apache Processes, Apache IO, Database connections, Load, Query/sec Using SSH Tunneling Virtual Private & Public LANs VPN

More Related Content

PDF
Null bhopal Sep 2016: What it Takes to Secure a Web Application
PDF
Tale of Forgotten Disclosure and Lesson learned
PDF
My tryst with sourcecode review
PDF
Nodevember 2015
PPTX
Zap vs burp
PDF
Node Day - Node.js Security in the Enterprise
PDF
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
PDF
Slides null puliya linux basics
Null bhopal Sep 2016: What it Takes to Secure a Web Application
Tale of Forgotten Disclosure and Lesson learned
My tryst with sourcecode review
Nodevember 2015
Zap vs burp
Node Day - Node.js Security in the Enterprise
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
Slides null puliya linux basics

What's hot (20)

PPTX
Nodejs Security
PPTX
Heybe Pentest Automation Toolkit - BlackHat USA 2015
PDF
From 0 to Secure in 1 Minute - Securing laaS - Nir Valtman
PDF
How to Setup A Pen test Lab and How to Play CTF
PDF
Automated Infrastructure Security: Monitoring using FOSS
PPT
[Php Camp]Owasp Php Top5+Csrf
ODP
Automating OWASP ZAP - DevCSecCon talk
PDF
Hardening Your Config Management - Security and Attack Vectors in Config Mana...
PDF
Kan du få data tilbake igjen fra dine Elasticsearch snapshots?
PPTX
OSX/Pirrit: The blue balls of OS X adware
PDF
Automating Security Testing with the OWTF
PDF
Android Tamer: Virtual Machine for Android (Security) Professionals
PPTX
Bug Bounty 101
PPT
Pentesting Using Burp Suite
PPTX
Ransomware - what is it, how to protect against it
PPTX
Supply Chainsaw
PDF
CNIT 128 8. Identifying and Exploiting Android Implementation Issues (Part 1)
PDF
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
PPTX
Security Testing - Zap It
ODP
OWASP 2012 AppSec Dublin ZAP Intro
Nodejs Security
Heybe Pentest Automation Toolkit - BlackHat USA 2015
From 0 to Secure in 1 Minute - Securing laaS - Nir Valtman
How to Setup A Pen test Lab and How to Play CTF
Automated Infrastructure Security: Monitoring using FOSS
[Php Camp]Owasp Php Top5+Csrf
Automating OWASP ZAP - DevCSecCon talk
Hardening Your Config Management - Security and Attack Vectors in Config Mana...
Kan du få data tilbake igjen fra dine Elasticsearch snapshots?
OSX/Pirrit: The blue balls of OS X adware
Automating Security Testing with the OWTF
Android Tamer: Virtual Machine for Android (Security) Professionals
Bug Bounty 101
Pentesting Using Burp Suite
Ransomware - what is it, how to protect against it
Supply Chainsaw
CNIT 128 8. Identifying and Exploiting Android Implementation Issues (Part 1)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Security Testing - Zap It
OWASP 2012 AppSec Dublin ZAP Intro
Ad

Similar to 5 Bare Minimum Things A Web Startup CTO Must Worry About (20)

PPT
Download It
PDF
Scalable, good, cheap
PDF
Seven steps to better security
PPTX
Infrastructure Considerations : Design : "webops"
PDF
Top ten-list
PPTX
Systems administration for coders presentation
PDF
Session10-PHP Misconfiguration
PPTX
Open Source Security
PDF
Web Application Scanning 101
PDF
Web 2.0 Performance and Reliability: How to Run Large Web Apps
PDF
Fixing twitter
PDF
Fixing_Twitter
PDF
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
PDF
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
PDF
Web server security techniques by Khawar Nehal
PDF
Web Security
PDF
Developers Focus on Security-Minded Tooling - Quintis Venter
ZIP
Silos are for farmers
ODP
How secure is your code?
PPT
Certification and Accreditation for Your Open Government Applications
Download It
Scalable, good, cheap
Seven steps to better security
Infrastructure Considerations : Design : "webops"
Top ten-list
Systems administration for coders presentation
Session10-PHP Misconfiguration
Open Source Security
Web Application Scanning 101
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Fixing twitter
Fixing_Twitter
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Web server security techniques by Khawar Nehal
Web Security
Developers Focus on Security-Minded Tooling - Quintis Venter
Silos are for farmers
How secure is your code?
Certification and Accreditation for Your Open Government Applications
Ad

More from Indus Khaitan (14)

PDF
Product marketing in B2B SaaS Startup Indus Khaitan 2018
PPTX
Bringing Contracts to Life | Keynote session at IACCM Dublin Ireland, May 2015
PPTX
Oracle OpenWorld | CON9707 Enterprise Mobile Security Architecture beyond the...
PPTX
Oracle OpenWorld 2015 | CON9456 Mobile Security in the Cloud
PPTX
Lets talk about decision making - UC Berkeley
PPTX
Bitzer Mobile TiECON 2013 Pitch Indus Khaitan
PPT
Mobile Security
PPTX
NSDC at NASSCOM Product Conclave 2010
PPT
NSEF India - Why become a social entrepreneur now
PPT
Building Winning Teams - Jain International Trade Organization Bangalore 06_J...
PPT
Disha 2010 Presentation on Entrepreneurship Jan'10 -- Indus Khaitan
PPT
Ford Motor Company 1902 Indus Khaitan
PPT
Creating Interactive Olap Applications With My Sql Enterprise And Mondrian Pr...
ZIP
Practical MySQL
Product marketing in B2B SaaS Startup Indus Khaitan 2018
Bringing Contracts to Life | Keynote session at IACCM Dublin Ireland, May 2015
Oracle OpenWorld | CON9707 Enterprise Mobile Security Architecture beyond the...
Oracle OpenWorld 2015 | CON9456 Mobile Security in the Cloud
Lets talk about decision making - UC Berkeley
Bitzer Mobile TiECON 2013 Pitch Indus Khaitan
Mobile Security
NSDC at NASSCOM Product Conclave 2010
NSEF India - Why become a social entrepreneur now
Building Winning Teams - Jain International Trade Organization Bangalore 06_J...
Disha 2010 Presentation on Entrepreneurship Jan'10 -- Indus Khaitan
Ford Motor Company 1902 Indus Khaitan
Creating Interactive Olap Applications With My Sql Enterprise And Mondrian Pr...
Practical MySQL

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
The various Industrial Revolutions .pptx
PDF
project resource management chapter-09.pdf
PDF
August Patch Tuesday
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PPT
What is a Computer? Input Devices /output devices
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
1. Introduction to Computer Programming.pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
NewMind AI Weekly Chronicles - August'25-Week II
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
The various Industrial Revolutions .pptx
project resource management chapter-09.pdf
August Patch Tuesday
OMC Textile Division Presentation 2021.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
O2C Customer Invoices to Receipt V15A.pptx
What is a Computer? Input Devices /output devices
Group 1 Presentation -Planning and Decision Making .pptx
DP Operators-handbook-extract for the Mautical Institute
A novel scalable deep ensemble learning framework for big data classification...
Getting started with AI Agents and Multi-Agent Systems
cloud_computing_Infrastucture_as_cloud_p
Univ-Connecticut-ChatGPT-Presentaion.pdf
1 - Historical Antecedents, Social Consideration.pdf
Assigned Numbers - 2025 - Bluetooth® Document
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
1. Introduction to Computer Programming.pptx
Module 1.ppt Iot fundamentals and Architecture

5 Bare Minimum Things A Web Startup CTO Must Worry About

  • 1. 5 Bare Minimum Things a Web startup CTO MUST worry about Indus Khaitan http://khaitan.org [email_address] Twitter: 1ndus *Not affiliated to any software vendors mentioned in this preso … and implement few basic things to have a good night’s sleep! 18 slides
  • 2. What are these? Security Availability & Monitoring Application Errors Backup Source Control (in order of decreasing priority)
  • 3. Security Threats Your website taken over Your database taken over Your server taken over (Distributed) Denial of Service
  • 4. Prevention of Security Threats Keep your stack up-to-date. Patch. Establish security-aware coding practice Know your Logs! Install open source packages for preventive/reactive treatments Get a hardware firewall (if you are popular and have money) … Subscribe to Securityfocus alerts
  • 5. Simple TODO List for You Use logwatch and monitor your logs Make your Database access local (specific IPs only) Secure your sshd Password-less login, non-default port, no root login Use denyhosts to block dictionary SSH attacks (iptables/netfilter is a good bet, I haven’t tried it) Close all ports except SSH, HTTP/HTTPS Use nmap to see what “hackers” see!
  • 6. A log snapshot of SSH attack Didn't receive an ident from these IPs: 114.200.199.144: 1 Time(s) Illegal users from: 114.200.199.144: 6 times alias/password: 1 time office/password: 1 time recruit/password: 1 time sales/password: 1 time samba/password: 1 time staff/password: 1 time Failed logins from: 211.60.15.30: 1 time root/password: 1 time 219.137.24.12: 1 time root/password: 1 time
  • 7. Availability & Monitoring Website, Database, SMTP, DNS were down (now up!) Poor site performance Application, Network, or hosting provider? CPU, Disk, IO, Memory, Network Interface Server down != website down. Put a load balancer
  • 9. Monitoring: Internal System Level Monitoring with Nagios
  • 10. Simple TODO List for You Do some basic external monitoring Zoho does url/5minutes at $4/month...cheap! Get Nagios for system monitoring Use Load Balancer to prevent single server failure HTTP, Load Balanced database reads
  • 11. Application Errors Bad Code function validate($key) { global $weblog ; if (empty($key)) { $errorlog->error( "Error : In function validate site key"); return FALSE; }else{ return TRUE; } } Leads to this in phperror log [13-Feb-2009 09:41:32] PHP Fatal error: Call to a member function error() on a non-object in /home/padmin/public_html/util/functions.php on line 4
  • 12. Application Errors Simple WARNINGS/FATALs lead to bigger problems eg. INSERT failed because of duplicate key (was always inserting 0 for the parameter!) Apache error_log may show wrong configuration Database logs may show a crash (and auto-recovery!)
  • 13. Simple TODO for You Use a logger like log4j/log4PHP Modify the handler to send a real-time email of a desired error level Look for Database Error logs, Apache error logs – They will tell you a story! Borrow from Security: Use logwatch package Review your own application codebase
  • 14. Backup Backup before disaster strikes Database backups Do a dry run of recovery at least once Ensure consistent, online backups Backup your production directories
  • 15. Simple TODO For You (mysql) Use a slave for a consistent backup. No slave? Then Lock the master before dumping Take a backup tar of production Preferably backed up every week, and just before a deployment and just after a deployment Use S3 to store the files remotely
  • 16. Source Control: Simple TODO For You Use SVN Use hosted… DevGuard..$7/month..cheap! Few Developers? Can’t do Linux? No money? Use a local SVN server on Windows. Woorrks! But back-it-up!!! Have a prod. deployment strategy From SVN, DON’T deploy directly on Prod., use a separate instance and then scp/rsync over
  • 17. Summary Know Your Logs! Be Security aware Lock your SSH. Close Open Ports Do some basic external monitoring Backup your Database & prod directory onto a remote location Use SVN
  • 18. Sample Advanced Topics & Thanks! Incremental backups, snapshots Monitoring Apache Processes, Apache IO, Database connections, Load, Query/sec Using SSH Tunneling Virtual Private & Public LANs VPN

Editor's Notes

  • #2: 1. How many of you use Windows for your web startup? Hmm..This preso may sound Kanglish to you.