SlideShare a Scribd company logo
1 of 38
Joomla! Security 101
    What to do before disaster strikes

http://akeeba.info/security-101
Hi, I’m
    Nicholas
    Dionysopoulos
    and I bet you can’t
    pronounce my last
    name




http://akeeba.info/me
What is site security?
And what Chuck Norris has to do with anything?!
Security is about...


   making it harder
     to infiltrate, not
  making it impossible
How do you do that?
What stands between your site and hackers?
Security comes in layers

  Incoming request

       Firewall

 Web Server (Global)

Web Server (.htaccess)

       Joomla!

     Extensions
Security comes in layers

  Incoming request
                         Always managed by your host
       Firewall

 Web Server (Global)

Web Server (.htaccess)

       Joomla!

     Extensions
Security comes in layers

  Incoming request

       Firewall
                         mod_security, suPHP, …
 Web Server (Global)

Web Server (.htaccess)

       Joomla!

     Extensions
Security comes in layers

  Incoming request

       Firewall

 Web Server (Global)
                         The most basic protection
Web Server (.htaccess)

       Joomla!

     Extensions
Security comes in layers

  Incoming request

       Firewall

 Web Server (Global)

Web Server (.htaccess)
                         Basic filtering
       Joomla!

     Extensions
Security comes in layers

  Incoming request

       Firewall

 Web Server (Global)

Web Server (.htaccess)

       Joomla!
                         These are ultimately responsible!
     Extensions
Security comes in layers

  Incoming request

       Firewall

 Web Server (Global)

Web Server (.htaccess)

       Joomla!

     Extensions
Our scope today

  Incoming request

       Firewall

 Web Server (Global)

Web Server (.htaccess)

       Joomla!

     Extensions
The basics
What we’re supposed to do and rarely do it
Frequent, tested backups
    Would you jump off a plane without a parachute?




http://akeeba.info/backup
Update, yesterday
     Yesterday’s code is tomorrow’s hack




http://akeeba.info/basic-security
Protect your backend
The login is not enough
777: The number of the beast
    Permissions are doors; don’t leave them open




http://akeeba.info/777
Sensible permissions
 Ask your host to enable suPHP or Apache’s mod_itk
 Site root 0755 or 0700
 Directories 0755
 Files 0644
 If you “must” use 0777 (don’t!) protect with .htaccess:

 order deny, allow
 deny from all
Don’t be a sitting duck
It’s duck season!
Mind your prefix
     Nobody wants to be a jos_




http://akeeba.info/prefix
62 reasons to fire your Super Administrator
    or 42, depending on Joomla! version...




http://akeeba.info/62-reasons
Security Kung-Fu
     You can’t kill a Ninja

http://akeeba.info/ninja
Visual fingerprinting
     Seeing is believing and then some

                                          tm
                                            pl=
                                                  offl
                                                      ine


    tp =1




http://akeeba.info/ninja             template =ja_purity
Visual fingerprinting
        RewriteCond %{QU
                         ERY_STRING} (^|
       &)tmpl=(componen
                        t|system) [NC]
       RewriteRule .* -
                          [L]
       RewriteCond %{QU
                        ERY_STRING} (^|&
                                         )t(p|emplate|
       mpl)= [NC]
       RewriteRule .* -
                        [F]




http://akeeba.info/ninja
PHP has a big mouth
     and that’s not water cooler gossip!




http://akeeba.info/ninja
PHP has a big mouth




http://akeeba.info/ninja
PHP has a big mouth
       RewriteCond %{QU
                        ERY_STRING} =PH
                                         P[a-f0-9]{8}-[a-
       f0-9]{4}-[a-f0-9
                        ]{4}-[a-f0-9]{4}
                                         -[a-f0-9]{12}
       [NC]
       RewriteRule .* -
                        [F]




http://akeeba.info/ninja
Blind Elephant
     Meet your supervillain




http://akeeba.info/ninja
Blind Elephant




http://akeeba.info/ninja
Blind Elephant
          nicholas@teapot:~/blindelephant$ ./BlindElephant.py mysite.com joomla
          Loaded /home/nicholas/projects/3rdparty/blindelephant/trunk/src/build/lib.linux-x86_64-2.6/blindelephant/
          dbs/joomla.pkl with 33 versions, 3696 differentiating paths, and 122 version groups.
          Starting BlindElephant fingerprint for version of joomla at http://joomla.ubuntu.web

          Hit http://joomla.ubuntu.web/media/system/js/validate.js
          Possible versions based on result: 1.5.17, 1.5.18

          Hit http://joomla.ubuntu.web/includes/js/joomla.javascript.js
          Possible versions based on result: 1.5.17, 1.5.18

          Hit http://joomla.ubuntu.web/media/system/js/caption.js
          Possible versions based on result: 1.5.17, 1.5.18

          Hit http://joomla.ubuntu.web/media/system/js/openid.js
          Possible versions based on result: 1.5.17, 1.5.18

          Hit http://joomla.ubuntu.web/templates/rhuk_milkyway/css/template.css
          Possible versions based on result: 1.5.17, 1.5.18

          Fingerprinting resulted in:
          1.5.17
          1.5.18

          Best Guess: 1.5.18

http://akeeba.info/ninja
Blind Elephant

        RewriteRule ^ima
                         ges/stories/.*.
                                         (jp(e?g|2)?|png|
       gif|bmp|css|js|s
                        wf|ico)$ - [L]
       RewriteCond %{HT
                        TP_REFERER} .
       RewriteCond %{HT
                        TP_REFERER} !^ht
                                         tps?://(www.)?
       example.com [NC]
      RewriteCond %{RE
                       QUEST_FILENAME}
                                        -f
      RewriteRule .(j
                       p(e?g|2)?|png|gi
                                        f|bmp|css|js|
      swf|ico)$ - [F]




http://akeeba.info/ninja
There are more threats
 Cross-site scripting (XSS)
 Remote file inclusion (RFI)
 Local file inclusion (LFI)
 SQL injection (SQLi)
 Cross-site request forgery (CSRF)
 Brute force password cracking
 Spamming & e-mail harvesting
More protection for you

f re e!                      2 0€ 10€
   The Master                  Admin Tools
    .htaccess                  Professional
http://akeeba.info/master-
                              http://akeeba.info/atpro
         htaccess

                               Use coupon code
                              JOSCAR for 50% off
One more thing...


 security is a
  process
Any questions?
That’s all folks!
Want the slides? http://akeeba.info/security-101

More Related Content

Viewers also liked

язык неба и земли,
язык неба и земли,язык неба и земли,
язык неба и земли,AlenaMihaylovna
 
DIPLOMA - young artists 2016
DIPLOMA - young artists 2016DIPLOMA - young artists 2016
DIPLOMA - young artists 2016Silvia Floares
 
Fat cat distr._master
Fat cat distr._masterFat cat distr._master
Fat cat distr._masterevtech
 
2009-02-18 Driving Action in Textbook Affordability (ACCCA Conference)
2009-02-18 Driving Action in Textbook Affordability (ACCCA Conference)2009-02-18 Driving Action in Textbook Affordability (ACCCA Conference)
2009-02-18 Driving Action in Textbook Affordability (ACCCA Conference)Nicole Allen
 
Activity 1
Activity 1Activity 1
Activity 1izadat
 
Tanjaouiates au Rallye Aicha des Gazelles
Tanjaouiates au Rallye Aicha des GazellesTanjaouiates au Rallye Aicha des Gazelles
Tanjaouiates au Rallye Aicha des GazellesSarah
 
Campaña Anti Tabaco
Campaña Anti TabacoCampaña Anti Tabaco
Campaña Anti Tabacospereirac
 
MFLA Launch
MFLA LaunchMFLA Launch
MFLA Launchcloud786
 
Azimut Yacht Club - May 2011 Issue - Azimut Yacht Brokerage & Charter
Azimut Yacht Club - May 2011 Issue - Azimut Yacht Brokerage & CharterAzimut Yacht Club - May 2011 Issue - Azimut Yacht Brokerage & Charter
Azimut Yacht Club - May 2011 Issue - Azimut Yacht Brokerage & CharterAzimut Yacht Club
 
School health webinar june 6th life secure draft 6.2.11 presentation
School health webinar june 6th   life secure draft 6.2.11 presentationSchool health webinar june 6th   life secure draft 6.2.11 presentation
School health webinar june 6th life secure draft 6.2.11 presentationLifeSecure
 
Contents page analysis
Contents page analysisContents page analysis
Contents page analysisyumm
 
albummostra
albummostraalbummostra
albummostraMRBJPA
 
AWWA/WEF Student Chapter Presentation
AWWA/WEF Student Chapter PresentationAWWA/WEF Student Chapter Presentation
AWWA/WEF Student Chapter PresentationZachary Collins
 

Viewers also liked (19)

Tokio,japon
Tokio,japonTokio,japon
Tokio,japon
 
язык неба и земли,
язык неба и земли,язык неба и земли,
язык неба и земли,
 
DIPLOMA - young artists 2016
DIPLOMA - young artists 2016DIPLOMA - young artists 2016
DIPLOMA - young artists 2016
 
Fat cat distr._master
Fat cat distr._masterFat cat distr._master
Fat cat distr._master
 
2009-02-18 Driving Action in Textbook Affordability (ACCCA Conference)
2009-02-18 Driving Action in Textbook Affordability (ACCCA Conference)2009-02-18 Driving Action in Textbook Affordability (ACCCA Conference)
2009-02-18 Driving Action in Textbook Affordability (ACCCA Conference)
 
Activity 1
Activity 1Activity 1
Activity 1
 
Superlative
SuperlativeSuperlative
Superlative
 
Tanjaouiates au Rallye Aicha des Gazelles
Tanjaouiates au Rallye Aicha des GazellesTanjaouiates au Rallye Aicha des Gazelles
Tanjaouiates au Rallye Aicha des Gazelles
 
Campaña Anti Tabaco
Campaña Anti TabacoCampaña Anti Tabaco
Campaña Anti Tabaco
 
MFLA Launch
MFLA LaunchMFLA Launch
MFLA Launch
 
Azimut Yacht Club - May 2011 Issue - Azimut Yacht Brokerage & Charter
Azimut Yacht Club - May 2011 Issue - Azimut Yacht Brokerage & CharterAzimut Yacht Club - May 2011 Issue - Azimut Yacht Brokerage & Charter
Azimut Yacht Club - May 2011 Issue - Azimut Yacht Brokerage & Charter
 
School health webinar june 6th life secure draft 6.2.11 presentation
School health webinar june 6th   life secure draft 6.2.11 presentationSchool health webinar june 6th   life secure draft 6.2.11 presentation
School health webinar june 6th life secure draft 6.2.11 presentation
 
Ion Gaina
Ion GainaIon Gaina
Ion Gaina
 
Comun.masa.rot
Comun.masa.rotComun.masa.rot
Comun.masa.rot
 
Comenius
ComeniusComenius
Comenius
 
Contents page analysis
Contents page analysisContents page analysis
Contents page analysis
 
albummostra
albummostraalbummostra
albummostra
 
AWWA/WEF Student Chapter Presentation
AWWA/WEF Student Chapter PresentationAWWA/WEF Student Chapter Presentation
AWWA/WEF Student Chapter Presentation
 
профессии
профессиипрофессии
профессии
 

Recently uploaded

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 

Recently uploaded (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

JaB11 - Joomla! Security 101

  • 1. Joomla! Security 101 What to do before disaster strikes http://akeeba.info/security-101
  • 2. Hi, I’m Nicholas Dionysopoulos and I bet you can’t pronounce my last name http://akeeba.info/me
  • 3. What is site security? And what Chuck Norris has to do with anything?!
  • 4. Security is about... making it harder to infiltrate, not making it impossible
  • 5. How do you do that? What stands between your site and hackers?
  • 6. Security comes in layers Incoming request Firewall Web Server (Global) Web Server (.htaccess) Joomla! Extensions
  • 7. Security comes in layers Incoming request Always managed by your host Firewall Web Server (Global) Web Server (.htaccess) Joomla! Extensions
  • 8. Security comes in layers Incoming request Firewall mod_security, suPHP, … Web Server (Global) Web Server (.htaccess) Joomla! Extensions
  • 9. Security comes in layers Incoming request Firewall Web Server (Global) The most basic protection Web Server (.htaccess) Joomla! Extensions
  • 10. Security comes in layers Incoming request Firewall Web Server (Global) Web Server (.htaccess) Basic filtering Joomla! Extensions
  • 11. Security comes in layers Incoming request Firewall Web Server (Global) Web Server (.htaccess) Joomla! These are ultimately responsible! Extensions
  • 12. Security comes in layers Incoming request Firewall Web Server (Global) Web Server (.htaccess) Joomla! Extensions
  • 13. Our scope today Incoming request Firewall Web Server (Global) Web Server (.htaccess) Joomla! Extensions
  • 14. The basics What we’re supposed to do and rarely do it
  • 15. Frequent, tested backups Would you jump off a plane without a parachute? http://akeeba.info/backup
  • 16. Update, yesterday Yesterday’s code is tomorrow’s hack http://akeeba.info/basic-security
  • 17. Protect your backend The login is not enough
  • 18. 777: The number of the beast Permissions are doors; don’t leave them open http://akeeba.info/777
  • 19. Sensible permissions Ask your host to enable suPHP or Apache’s mod_itk Site root 0755 or 0700 Directories 0755 Files 0644 If you “must” use 0777 (don’t!) protect with .htaccess: order deny, allow deny from all
  • 20. Don’t be a sitting duck It’s duck season!
  • 21. Mind your prefix Nobody wants to be a jos_ http://akeeba.info/prefix
  • 22. 62 reasons to fire your Super Administrator or 42, depending on Joomla! version... http://akeeba.info/62-reasons
  • 23. Security Kung-Fu You can’t kill a Ninja http://akeeba.info/ninja
  • 24. Visual fingerprinting Seeing is believing and then some tm pl= offl ine tp =1 http://akeeba.info/ninja template =ja_purity
  • 25. Visual fingerprinting RewriteCond %{QU ERY_STRING} (^| &)tmpl=(componen t|system) [NC] RewriteRule .* - [L] RewriteCond %{QU ERY_STRING} (^|& )t(p|emplate| mpl)= [NC] RewriteRule .* - [F] http://akeeba.info/ninja
  • 26. PHP has a big mouth and that’s not water cooler gossip! http://akeeba.info/ninja
  • 27. PHP has a big mouth http://akeeba.info/ninja
  • 28. PHP has a big mouth RewriteCond %{QU ERY_STRING} =PH P[a-f0-9]{8}-[a- f0-9]{4}-[a-f0-9 ]{4}-[a-f0-9]{4} -[a-f0-9]{12} [NC] RewriteRule .* - [F] http://akeeba.info/ninja
  • 29. Blind Elephant Meet your supervillain http://akeeba.info/ninja
  • 31. Blind Elephant nicholas@teapot:~/blindelephant$ ./BlindElephant.py mysite.com joomla Loaded /home/nicholas/projects/3rdparty/blindelephant/trunk/src/build/lib.linux-x86_64-2.6/blindelephant/ dbs/joomla.pkl with 33 versions, 3696 differentiating paths, and 122 version groups. Starting BlindElephant fingerprint for version of joomla at http://joomla.ubuntu.web Hit http://joomla.ubuntu.web/media/system/js/validate.js Possible versions based on result: 1.5.17, 1.5.18 Hit http://joomla.ubuntu.web/includes/js/joomla.javascript.js Possible versions based on result: 1.5.17, 1.5.18 Hit http://joomla.ubuntu.web/media/system/js/caption.js Possible versions based on result: 1.5.17, 1.5.18 Hit http://joomla.ubuntu.web/media/system/js/openid.js Possible versions based on result: 1.5.17, 1.5.18 Hit http://joomla.ubuntu.web/templates/rhuk_milkyway/css/template.css Possible versions based on result: 1.5.17, 1.5.18 Fingerprinting resulted in: 1.5.17 1.5.18 Best Guess: 1.5.18 http://akeeba.info/ninja
  • 32. Blind Elephant RewriteRule ^ima ges/stories/.*. (jp(e?g|2)?|png| gif|bmp|css|js|s wf|ico)$ - [L] RewriteCond %{HT TP_REFERER} . RewriteCond %{HT TP_REFERER} !^ht tps?://(www.)? example.com [NC] RewriteCond %{RE QUEST_FILENAME} -f RewriteRule .(j p(e?g|2)?|png|gi f|bmp|css|js| swf|ico)$ - [F] http://akeeba.info/ninja
  • 33. There are more threats Cross-site scripting (XSS) Remote file inclusion (RFI) Local file inclusion (LFI) SQL injection (SQLi) Cross-site request forgery (CSRF) Brute force password cracking Spamming & e-mail harvesting
  • 34. More protection for you f re e! 2 0€ 10€ The Master Admin Tools .htaccess Professional http://akeeba.info/master- http://akeeba.info/atpro htaccess Use coupon code JOSCAR for 50% off
  • 35. One more thing... security is a process
  • 38. Want the slides? http://akeeba.info/security-101

Editor's Notes

  1. Scratches the surface\nImperative everyone follows this advice\n\nNext: Me\n
  2. 30-y.o. Mech Engineer turned web dev\nInto PHP for > 10 years\nLead dev of Akeeba Backup and Admin Tools\n\nNext: Basic Security\n
  3. What is it?\nIs it Chuck Norris on your site?\nMaking site unhackable?\n
  4. Make it harder, not impossible\n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. Everyone knows these things have to be done\nWe rarely do them because we’re bored\n\nNext: Backups\n
  18. Use Akeeba Backup or any other tool for at least daily backups\nTest restore backups every week or after installing a new release\n\nNext: Updates\n
  19. Always update on the same day\nKeep an eye on JVEL\nSubscribe to ahead warning service like SalvusAlerting\n\nNext: backend protection\n
  20. Password-protect administrator\nAdd secret key to administrator (jSecure, Admin Tools Professional, etc)\n\nNext: 777\n
  21. Why 0777 is a bad idea (hack from the inside)\nSane perms on next slide\n\nNext: perms\n
  22. Use suPHP/mod_itk if possible\nRoot 0755 / 0700 (disables 0777)\nDirs 0755, Files 0644\nYou never “must” use 0777. If you do, use .htaccess\n\nNext: sitting duck\n
  23. Default Joomla! settings = sitting duck\nIt’s duck hunting season; you don’t want to be a duck\n\nNext: prefix\n
  24. Prefix has nothing to do with telephony\nDefault jos_ table prefix is evil\nUse something random; use Admin Tools for easy change\nDanger, Will Robinson: some extensions might break\n\nNext: Super Admin ID\n
  25. Default SA ID is 62/42. Used in direct SQLi attacks.\nDo not just create a new user, equally unsafe.\nCreate a “low ID” user; use Admin Tools\n\nNext: Ninja!\n
  26. How the big boys deal with security\nSome tips are over the top\nYou can never be too paranoid w/ security\n\nNext: Visual fingerprinting\n
  27. Appending parameters can reveal too much\nUsed to identify your site as a Joomla! site = potential target\nSecurity through obscurity; not THE solution, but it helps\n\nNext: solution\n
  28. These rules in my Master .htaccess\n\nNext: PHP has a big mouth\n
  29. Appending parameters can reveal too much\nUsed to identify your PHP version\nCan deliver non-Joomla! specific exploits\n\nNext: demonstration\n
  30. This is what it looks like\nEach version has a different image!\n\nNext: solution\n
  31. These rules are in my master .htaccess\n\nNext: Blind Elephant\n
  32. No, you’re not going to the circus; or a safari.\nA blind elephant is after you and will stomp you.\nSee for yourself! (next slide)\n\nNext: BlindElephant run\n
  33. Typical blind elephant run\nIt’s not the only fingerprinting script\nThey’re moderately to very accurate\n\nNext: solution\n
  34. These rules are in my master .htaccess\n\nNext: More protection\n
  35. \n
  36. My master .htaccess is free, reqs expert knowledge, no support\nATPro is easier for site builders, has docs, support\n\nNext: security is a process\n
  37. It’s not fire and forget. You have to work on it continuously as your site evolves.\n\nNext: questions\n
  38. Ask your questions!\n\nNext: the end\n
  39. Thank you for listening\nVisit the URL for the slides in PDF format\n\nTHE END\n
  40. Thank you for listening\nVisit the URL for the slides in PDF format\n\nTHE END\n