SlideShare a Scribd company logo
Security 101Some of what you need to knowOwen WinklerRock River Starhttp://RockRiverStar.com/@ringmaster
The planWhat security isSecurity on the webTypes of threatsTools and sitesImpact of Security
What security is
Wikipedia SaysAncient Greek “Se-Cura” – “without fear”Obtain freedom from fear
Layers of Security
Convenience
What to do when my crap gets stolen…Call copsReplace itSteal it backFile insurance claim
Just like real securityComputer security
Application SecurityPassword StrengthSocial Engineering
Password Strengthhttp://www.wired.com/politics/security/commentary/securitymatters/2006/12/72300Top 20 Passwordspassword1, abc123, myspace1, password, blink182, qwerty1, fuckyou, 123abc, baseball1, football1, 123456, soccer, monkey1, liverpool1, princess1, jordan23, slipknot1, superman1, iloveyou1,And of course…   monkey
PasswordsPeople don’t careL3tt3r5 a5 numb3r5Master passwordSigned loginsSharing and storingTwo-factor!
The inverse of layered security is…Site PasswordDatabase passwordServer passwordAccount passwordDatacenter accessGlobal economic failureThermonuclear war
PermissionsAuthentication vs. AuthorizationSee only authorized informationPost-deployment accounts
VulnerabilitiesFrom wikipedia: A weakness that makes a threat possibleInput validationXSRF – Cross site request forgeryXSS – Cross site scriptingSQL-I – SQL injection
Input ValidationEvery input & every outputFilter for what you wantValidation in DrupalAjaxView argumentsPHP executionInput filterscheck_plain() and check_markup()
XSSBad input/output filteringElevated user privileges
XSRFForm on a remote siteSocial engineering
Drupal security best practices
SQL injectionBad input filteringInsert from the querystringDrupalmostly safe
TestingAutomated testingEyeball inspectionExpectation
Drupal SecurityDirect advisories – http://drupal.org/securityContrib– http://drupal.org/security/contribNew Reports: security@drupal.org
Server permissionsComputer-level securityUser uploadsFile typesSizesSFTP Directories
chmod & chownMode settingsThree octal valuesUGO – User, Group, OtherRWX – Read (4), Write (2), Execute (1)sudochmod -R ugo+r *chown sets owner:groupsudochown -R owen:apache *What is +s?
Hosting & PHPUp to datePatched applicationseval() and other evilsPerformanceReliability
Backupss3cmdrsyncSubversion!Host-based recovery
Impact of ImplementationWhy I care about you: Bot-netsAppreciative users & clients
Any questions or additional topics?Security 101

More Related Content

Viewers also liked (7)

KEY
Web 3.0 voor fontys hogeschool
Peter Ros
 
PDF
WordCamp Philly 2011 - put your business on the web
Owen Winkler
 
KEY
Social media in 12minuten
Peter Ros
 
PDF
Qs Talk seminar klinish onderzoek
Peter Ros
 
PDF
Seo trends 2013
Peter Ros
 
PPTX
Source control management
Owen Winkler
 
PPT
Deployment And Change Management
Owen Winkler
 
Web 3.0 voor fontys hogeschool
Peter Ros
 
WordCamp Philly 2011 - put your business on the web
Owen Winkler
 
Social media in 12minuten
Peter Ros
 
Qs Talk seminar klinish onderzoek
Peter Ros
 
Seo trends 2013
Peter Ros
 
Source control management
Owen Winkler
 
Deployment And Change Management
Owen Winkler
 

Similar to Drupal security best practices (20)

PDF
Security by Design: An Introduction to Drupal Security
Tara Arnold
 
PDF
Security by design: An Introduction to Drupal Security
Mediacurrent
 
PPTX
Web Vulnerabilities - Building Basic Security Awareness
Gurpreet Luthra
 
PDF
Owasp top 10 web application security hazards - Part 1
Abhinav Sejpal
 
PPT
Internet Security
Mitesh Gupta
 
PPTX
Web security
rakesh bandaru
 
PPTX
Secure Software: Action, Comedy or Drama? (2017 edition)
Peter Sabev
 
PDF
Drupal Security Basics for the DrupalJax January Meetup
Chris Hales
 
PDF
Devbeat Conference - Developer First Security
Michael Coates
 
KEY
Drupal Security Intro
Cash Williams
 
PDF
Doing Drupal security right
Gábor Hojtsy
 
PPTX
Drupal Security: What You Need to Know
Mediacurrent
 
PPT
302 Content Server Security Challenges And Best Practices
phanleson
 
PDF
Web security and OWASP
Isuru Samaraweera
 
PPTX
Cyper security & Ethical hacking
Cmano Kar
 
PDF
Drupal security
Jozef Toth
 
PPTX
Security in e commerce
akhand Akhandenator
 
PPT
Web security
Jin Castor
 
PDF
Lets Make our Web Applications Secure
Aryashree Pritikrishna
 
PPT
Intro to Web Application Security
Rob Ragan
 
Security by Design: An Introduction to Drupal Security
Tara Arnold
 
Security by design: An Introduction to Drupal Security
Mediacurrent
 
Web Vulnerabilities - Building Basic Security Awareness
Gurpreet Luthra
 
Owasp top 10 web application security hazards - Part 1
Abhinav Sejpal
 
Internet Security
Mitesh Gupta
 
Web security
rakesh bandaru
 
Secure Software: Action, Comedy or Drama? (2017 edition)
Peter Sabev
 
Drupal Security Basics for the DrupalJax January Meetup
Chris Hales
 
Devbeat Conference - Developer First Security
Michael Coates
 
Drupal Security Intro
Cash Williams
 
Doing Drupal security right
Gábor Hojtsy
 
Drupal Security: What You Need to Know
Mediacurrent
 
302 Content Server Security Challenges And Best Practices
phanleson
 
Web security and OWASP
Isuru Samaraweera
 
Cyper security & Ethical hacking
Cmano Kar
 
Drupal security
Jozef Toth
 
Security in e commerce
akhand Akhandenator
 
Web security
Jin Castor
 
Lets Make our Web Applications Secure
Aryashree Pritikrishna
 
Intro to Web Application Security
Rob Ragan
 
Ad

Recently uploaded (20)

PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Top Managed Service Providers in Los Angeles
Captain IT
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Ad

Drupal security best practices

Editor's Notes

  • #3: 5 steps
  • #4: Sometimes the mythology clouds the full issueWhen we talk about security in the context of computers, our minds might tend to wander toward movies.But that’s not the full picture.So it might be helpful to back out of computers and talk about security in a general sense.
  • #5: The thing you’re trying to get with security is freedom from fear of harm.Your person, family, belongings, money, reputation, country…Each of these things has a different protection (examples)In each case, you’re creating some barrier be it physical or social between the thing that causes you harm and the asset you’re protecting.The more barriers you put, the safer a thing can be
  • #6: If you’re keeping some valuables at home, there may be additional safety by having a high gate, a strong lock on the door, and a safe to keep them in.This is in nice layers. When people say security is only as good as the weakest link, they’re not talking about…They are talking about how you’re protecting each entry into the house.
  • #7: Locking up your things inside a safe, inside a house, inside a fence, on an island surrounded by lava might be really safe, but doesn’t make it easy to get those things. Writing down a password to the computer ON the computer is pretty convenient, but obviously stupid.Depending on the ease we need to get at those things we should balance the amount of security we’re willing to afford to get it. Making anything easy for one person to obtain makes it at least fractionally easier for someone else to obtain.In spite of any protections you might take, a determined crook with enough time will probably, eventually, take your valuables.
  • #8: If you’ve got some valuable thing, you hope it won’t be stolen or broken, you you’ve still got to have some plan for when it does.It’s not just valuable stuff, either. People die. Having security for your family includes not just alleviating their fear of your death, but also alleviating their fear of what they’ll do when you die.This is just one aspect of defense in depth.In the real world, we take a lot of this stuff for granted. What people don’t seem to do very well is translate it to computer and online security.
  • #9: So what do we need to port over from the real world to the digital?We need layers.We need to protect from every angle.We need to balance security and convenience prudently.We need a backup – just in case.Defense in depth.
  • #10: Password strength is a simple thing, but is an obvious problem.Of the 23k people using Drupal 5 with the usage modulein January, 230 were using the password strength module to alert users to the strength of their passwords. We can beat ourselves up all day with XSRF and XSS and SQL injection, but our clients are stabbing us in the back here.One of the less immediately obvious, but more effective ways to get a password is via social engineering/hacking.Social hacking is getting to know a person or company, and integrating yourself as though you belong to obtain information you shouldn’t have.
  • #11: MySpace phishing attack – 34k usernames and passwords81% alphanumeric,Almost 10% just letters.Another point: Passwords aren’t just a point of failure on the site you use them onThere’s little you can do to your site can prevent a user from giving away his password to someone who shouldn’t have it.
  • #12: Things to think about passwords…People don’t care – you can set up a weak password for them; they never change it.Letters as numbers – hackers are onto you.Some good ideas – bookmark that lets you use a master password. Use mental masters.Use certs.When sharing passwords, encrypt them.Vidoop – now defunct – call and photo
  • #13: Why is password security and other seemingly low-level security important?Because a clever hacker will abuseDon’t put a sign outside that says “door unlocked, vault within”.Poor security where its easy to fix is usually an implication of worse security where its harder to fix. It’s an invitation to hackers to try.
  • #14: Permissions are important because after you use a password, you want to be able to do things with the system.Penn is a good example of authentication vs authorization.Just because you get into the system doesn’t mean you should see everything. Unauthenticated users are users too.Keeping secure admin passwords is important because after a site is deployed, we typically don’t remove those developer accounts.
  • #15: A weakness that makes a threat possible. Not necessarily likely. Doesn’t encourage it. Just has potential.These are the ones we should be on the lookout for.
  • #16: Every input should be filtered and so should every output. Should really have a good idea of what input is tainted by external influence in your system versus what data you know is clean.Always filter for what you want to have, rather than removing what you don’t want.Validation in Drupal isn’t just validating for types of values submitted, but also validating the data on its own, especially for output. Printing CCK fields is naughty.
  • #17: Number of ways for this to work. One example.
  • #18: Harder but more insidious.
  • #19: Here’s what the code looks like.Don’t do this with Drupal. Use the FormAPI. Includes extra fields that prevent forged requests.
  • #20: Drupal is mostly safe if you use the drupal functions.Drupal doesn’t use PDO – yet.Watch out for proper quotes around escaped values and IN clauses.
  • #21: How do we test for this stuff?Automated testing suites – Acunetix.Still requires someone who knows what they’re doing at the wheel.Acunetix is a tool. Be sure your using the right tool for the right job. If you’re looking for ways to make your server more secure, Acunetix is the wrong thing.Module security audits. Surprised that there isn’t a team for this.Like to start site-wide peer code reviews. Look at template code, look at custom modules.Are you going to catch everything? No. But we can limit bad things. We can do enough that mistakes become easier to find and to avoid when we’re working.
  • #22: Drupal issues security advisories against drupal core directly and hopefully provides timely updates.Contributed modules and themes are also announced here.Calendar? Date? On 7/29 Remotely exploitable XSS attacks were announced. Good feed to get on, especially if you want to find out about vulnerabilities before your clients see it in their logs.Be a good Drupal citizen. Report security issues properly.
  • #23: Move from app security out to computer securityRestrict the types of files that a user can upload so that they’re not uploading file types that the server will execute. Drupal settings let you set the upload type to wildcard – naughty.File sizes. Need to work on this. Take all server space, take down server.Giving clients access to directories. Suexec. SFTP vs FTP.
  • #24: Unix mode settings. Sticky bit used with umask to make new files take on their directory’s permissions.
  • #25: Selecting a host for security can be tough, because it’s costly to move and maintain servers. I’m going to say “host” but that could mean your corporate internal hosting too.Hosts that are worth the extra money will do most of this for you, but be careful. There are hosts that claim to offer “fully managed” hosting, but what they really mean is that you’ll pay extra to talk to a tech than then will charge you extra for what he should have been doing all along, or tell you that it’s a service they don’t provide.Be sure that your host launches you on an up-to-date server, with an OS that you can keep updated. You don’t want to be stuck using Fedora Core 4 when they stop supporting it just because your host has some software they bought 15 years ago that helps them launch sites automatically.If you’re not regularly getting messages about your host updating things on your server, you should check into that. For each time that Drupal issues an advisory – we’re on 6.13 already – you’ve got 20 applications running that all probably require an update to keep them secure.There are things you should be doing to keep your own server secure via PHP, especially if you’re giving clients access to your server. Check out the book Essential PHP Security by Chris Shiflett, which talks about some basic settings that will prevent errant code from doing bad things. Remember, layers of protection – If someone manages to get code on your server somehow - a client? – then limiting how that code can cause harm is a good idea from the get-go.Performance can impact security. A slow server fielding a low-yield DDoS attack is going to get crushed. A fast server is going to have an easier time. Any server with mod_evasive is going to have an even easier time.Quality of your host can play a big factor in security. When you place your trust in someone who can just walk off with all of your stuff, you gotta pick hosting that’s not run from a shack. … Look for service that isn’t going down every half hour. Look for redundant systems for power, network, storage. Look for service that actually answers the phone. You want to have it and you never want to use it. It’s like insurance.
  • #26: When all else fails.
  • #27: Poor security has an impact on everyone. Bot-nets.In the end, it’s about keeping our risk low and making our users feel safe about using the sites we build.
  • #28: Obviously, this is incomplete.