SlideShare a Scribd company logo
1 of 17
Download to read offline
Recommendations on the
Brute Force Attack
Ahmad Karawash
PhD in Technology of Information, Book Editor,
CCA, Latece, ACM & IEEE member
12/17/2015 1
Definition
A Brute Force attack is a method or an algorithm to determine a
password or user name using an automatic process.
12/17/2015 2
Way of work
• A Brute Force Attack simply uses the cryptography algorithm.
• hackers know that the password and user name are stored in a
database.
• when we attempt to login and our page request is sent from the
server to the client machine hackers are more active to access the
account.
• they attempt all possible combinations to unlock it.
• There is a computer program that runs automatically to get the
password.
12/17/2015 3
Role of key combination and length in
the password
12/17/2015 4
Tool Hacking Example
12/17/2015 5
Real Hack Example: Wordpress
12/17/2015 6
Blocking of Brut force Attack
• Locking Account
• Delay the login process
• Block the hacker IP
• CAPTCHAs Code Use
12/17/2015 7
Locking Account
• if a user attempts a wrong password many times then the user's
account will be blocked for a given time of period.
• Ex: outlook accounts are locked after a wrong password tries.
• Drawbacks:
• If an attacker attempts a Brute Force Attack on many accounts then a Denial
of Services (DOS) problem emerges.
• If a attackers want to lock an account then he continues to hit that account
and the resultant admin is again locked from the account.
12/17/2015 8
Delay the login process
• Increasing time delay for login to stop bruteforcing
• Example:
• Time_nanosleep(0, (50000000*$failed_attempts));
• More attempts a hacker uses to guess a password, more time does it take to
check every time. After checking a 100 passwords he must wait 5 sec
between each try.
• Drawback:
• You should try not to use Sleep() because it uses CPU cycles, and if you have a
brute force attack from 10,000 IP addresses you will fork 10,000 sleep() child
process or threads, this will cause load on your server.
12/17/2015 9
Delay the login process
• Drawbacks:
• Haytham Douaihy, Senior software engineer at Sword Group: “You should try
not to use Sleep() because it uses CPU cycles, and if you have a brute force
attack from 10,000 IP addresses you will fork 10,000 sleep() child process or
threads, this will cause load on your server”.
• There are a lot of companies developing protection tools based and
benefit from the brute force strategy to sell there own protection
softwares. Tools examples: Aircrack-ng, John the Ripper, Rainbow
Crack, Cain and Abel, …etc
12/17/2015 10
Example Delay code, reduce the number of guessed login attempts
possible by a hacker from thousands per minute down to only a few before the delay becomes so
long as to make it a pointless exercise, after 20 failed login attempts the delay is 6 days!
[HttpPost]
public async Task<ActionResult> Login(LoginViewModel viewModel, string returnUrl)
{
// incremental delay to prevent brute force attacks
int incrementalDelay;
if (HttpContext.Application[Request.UserHostAddress] != null)
{
// wait for delay if there is one
incrementalDelay = (int)HttpContext.Application[Request.UserHostAddress];
await Task.Delay(incrementalDelay * 1000);
}
if (!ModelState.IsValid)
return View();
// authenticate user
var user = _userService.Authenticate(viewModel.Username, viewModel.Password);
if (user == null)
{
// login failed
// increment the delay on failed login attempts
if (HttpContext.Application[Request.UserHostAddress] == null)
{
incrementalDelay = 1;
}
else
{
incrementalDelay = (int)HttpContext.Application[Request.UserHostAddress] * 2;
}
HttpContext.Application[Request.UserHostAddress] = incrementalDelay;
// return view with error
ModelState.AddModelError("", "The user name or password provided is incorrect.");
return View();
}
// login success
// reset incremental delay on successful login
if (HttpContext.Application[Request.UserHostAddress] != null)
{
HttpContext.Application.Remove(Request.UserHostAddress);
}
// set authentication cookie
_formsAuthenticationService.SetAuthCookie(
user.Username,
viewModel.KeepMeLoggedIn,
null);
// redirect to returnUrl
return Redirect(returnUrl);
}
12/17/2015 11
Block the hacker IP
• Simply block the IP address where the brute force attack comes.
• Some companies avoid to use this way because sometimes a user
might forget his password and tries to login several times. But the
result is that the server deal with him as a hacker and blocks his IP.
• Code Example:
Function block_ip($ip){
$deny = array(“$ip”);
If(in array ($_SERVER[‘REMOTE_ADDR’], $deny)){
Header(“HTTP/1.1 403 Forbidden”);
Exit();
}
}
12/17/2015 12
CAPTCHAs Code Use
• A CAPTCHA code is a technique by which we recognize a computer or
a human, by making some questions or images or numbers, the
answer of which is not submitted by the computer automatically.
• Most of the companies prefer this strategy to avoid bruteforce attacks
and avoid overwhelmed use of sleep() method that effect server
performance negatively.
12/17/2015 13
Recommendations
• Based on the research I have done and based on my security
experience, I recommend not to use the delay strategy but the
Captchas one.
• Sometimes you find the server weak, this because there are a lot of
brute force attacks and the servers CPU have to run a big number of
sleep(); functions.
12/17/2015 14
Recommendations
• Also, technically you can not avoid thousands of Login tries by
delaying the repeated ones from single IP that is because using cloud
nowadays hackers have the facilities to use thousands of virtual IPs.
• So if you publish your application on local server, its CPU is fully
loaded by sleep(); calls.
• And if you publish your application on the cloud, you might pay more
money.
12/17/2015 15
Recommendations
• [How to Stay in Control of Cloud Sites Resource Costs Overages
by Jereme Hancock | Aug 28, 2015 |]: “Brute force attacks against
unprotect contact forms or logins. Malicious attacks often target
login and contact forms in order to penetrate a site. Repeated,
constant attacks on unprotected sites drive up compute cycles as the
infrastructure processes each attempt. Many plugins are available to
provide contact form and login protection and can mitigate the
processing of illegitimate traffic. Captchas are very popular for
addressing this threat”.
12/17/2015 16
?? @:
Ahmad.Karawash@gmail.com
12/17/2015 17

More Related Content

What's hot

Password cracking and brute force
Password cracking and brute forcePassword cracking and brute force
Password cracking and brute forcevishalgohel12195
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practicesScott Hurrey
 
Man in The Middle Attack
Man in The Middle AttackMan in The Middle Attack
Man in The Middle AttackDeepak Upadhyay
 
WLAN Attacks and Protection
WLAN Attacks and ProtectionWLAN Attacks and Protection
WLAN Attacks and ProtectionChandrak Trivedi
 
Application Security | Application Security Tutorial | Cyber Security Certifi...
Application Security | Application Security Tutorial | Cyber Security Certifi...Application Security | Application Security Tutorial | Cyber Security Certifi...
Application Security | Application Security Tutorial | Cyber Security Certifi...Edureka!
 
Cybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationCybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationTriCorps Technologies
 
Footprinting and reconnaissance
Footprinting and reconnaissanceFootprinting and reconnaissance
Footprinting and reconnaissanceNishaYadav177
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTIONAnoop T
 
Ethical hacking a licence to hack
Ethical hacking a licence to hackEthical hacking a licence to hack
Ethical hacking a licence to hackDharmesh Makwana
 
Web application attacks
Web application attacksWeb application attacks
Web application attackshruth
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesSoftware Guru
 
Sql injection
Sql injectionSql injection
Sql injectionZidh
 

What's hot (20)

Password cracking and brute force
Password cracking and brute forcePassword cracking and brute force
Password cracking and brute force
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
 
Man in The Middle Attack
Man in The Middle AttackMan in The Middle Attack
Man in The Middle Attack
 
WLAN Attacks and Protection
WLAN Attacks and ProtectionWLAN Attacks and Protection
WLAN Attacks and Protection
 
Ethical Hacking Tools
Ethical Hacking ToolsEthical Hacking Tools
Ethical Hacking Tools
 
Application Security | Application Security Tutorial | Cyber Security Certifi...
Application Security | Application Security Tutorial | Cyber Security Certifi...Application Security | Application Security Tutorial | Cyber Security Certifi...
Application Security | Application Security Tutorial | Cyber Security Certifi...
 
Network attacks
Network attacksNetwork attacks
Network attacks
 
Password management
Password managementPassword management
Password management
 
Cybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationCybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your Organization
 
Owasp Top 10 A1: Injection
Owasp Top 10 A1: InjectionOwasp Top 10 A1: Injection
Owasp Top 10 A1: Injection
 
Footprinting and reconnaissance
Footprinting and reconnaissanceFootprinting and reconnaissance
Footprinting and reconnaissance
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTION
 
Ethical hacking a licence to hack
Ethical hacking a licence to hackEthical hacking a licence to hack
Ethical hacking a licence to hack
 
SQL injection
SQL injectionSQL injection
SQL injection
 
Ethical hacking
Ethical hacking Ethical hacking
Ethical hacking
 
Web application attacks
Web application attacksWeb application attacks
Web application attacks
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
 
Types of cyber attacks
Types of cyber attacksTypes of cyber attacks
Types of cyber attacks
 
Sql injection
Sql injectionSql injection
Sql injection
 

Viewers also liked

Bruteforce basic presentation_file - linx
Bruteforce basic presentation_file - linxBruteforce basic presentation_file - linx
Bruteforce basic presentation_file - linxidsecconf
 
How Computer Viruses Work
How Computer Viruses WorkHow Computer Viruses Work
How Computer Viruses WorkCerise Anderson
 
Brute Force Attacks - Finding and Stopping them
Brute Force Attacks - Finding and Stopping themBrute Force Attacks - Finding and Stopping them
Brute Force Attacks - Finding and Stopping themFlowTraq
 
Roadsec 2016 Watchdogs de hoje em dia. Hacking com dispositivos mobile
Roadsec 2016 Watchdogs de hoje em dia. Hacking com dispositivos mobileRoadsec 2016 Watchdogs de hoje em dia. Hacking com dispositivos mobile
Roadsec 2016 Watchdogs de hoje em dia. Hacking com dispositivos mobileKelvin Clark
 
Hacking Smartcards & RFID
Hacking Smartcards & RFIDHacking Smartcards & RFID
Hacking Smartcards & RFIDDevnology
 
04 brute force
04 brute force04 brute force
04 brute forceHira Gul
 
A Tutorial on Linear and Differential Cryptanalysis by Howard M. Heys
A Tutorial on Linear and Differential Cryptanalysis by Howard M. HeysA Tutorial on Linear and Differential Cryptanalysis by Howard M. Heys
A Tutorial on Linear and Differential Cryptanalysis by Howard M. HeysInformation Security Awareness Group
 
RootedCON 2014: Playing and Hacking with Digital Latches
RootedCON 2014: Playing and Hacking with Digital LatchesRootedCON 2014: Playing and Hacking with Digital Latches
RootedCON 2014: Playing and Hacking with Digital LatchesChema Alonso
 
Password Cracking
Password Cracking Password Cracking
Password Cracking Sina Manavi
 
Alphorm.com Formation Hacking et Sécurité , avancé
Alphorm.com Formation Hacking et Sécurité , avancéAlphorm.com Formation Hacking et Sécurité , avancé
Alphorm.com Formation Hacking et Sécurité , avancéAlphorm
 
Cyber security presentation
Cyber security presentationCyber security presentation
Cyber security presentationBijay Bhandari
 
Cybercrime.ppt
Cybercrime.pptCybercrime.ppt
Cybercrime.pptAeman Khan
 
Cyber security
Cyber securityCyber security
Cyber securitySiblu28
 

Viewers also liked (19)

Brute Forcing
Brute ForcingBrute Forcing
Brute Forcing
 
Bruteforce basic presentation_file - linx
Bruteforce basic presentation_file - linxBruteforce basic presentation_file - linx
Bruteforce basic presentation_file - linx
 
How Computer Viruses Work
How Computer Viruses WorkHow Computer Viruses Work
How Computer Viruses Work
 
Brute Force Attacks - Finding and Stopping them
Brute Force Attacks - Finding and Stopping themBrute Force Attacks - Finding and Stopping them
Brute Force Attacks - Finding and Stopping them
 
Roadsec 2016 Watchdogs de hoje em dia. Hacking com dispositivos mobile
Roadsec 2016 Watchdogs de hoje em dia. Hacking com dispositivos mobileRoadsec 2016 Watchdogs de hoje em dia. Hacking com dispositivos mobile
Roadsec 2016 Watchdogs de hoje em dia. Hacking com dispositivos mobile
 
Cryptanalysis Lecture
Cryptanalysis LectureCryptanalysis Lecture
Cryptanalysis Lecture
 
Hacking Smartcards & RFID
Hacking Smartcards & RFIDHacking Smartcards & RFID
Hacking Smartcards & RFID
 
Ethical Hacking
Ethical HackingEthical Hacking
Ethical Hacking
 
04 brute force
04 brute force04 brute force
04 brute force
 
A Tutorial on Linear and Differential Cryptanalysis by Howard M. Heys
A Tutorial on Linear and Differential Cryptanalysis by Howard M. HeysA Tutorial on Linear and Differential Cryptanalysis by Howard M. Heys
A Tutorial on Linear and Differential Cryptanalysis by Howard M. Heys
 
RootedCON 2014: Playing and Hacking with Digital Latches
RootedCON 2014: Playing and Hacking with Digital LatchesRootedCON 2014: Playing and Hacking with Digital Latches
RootedCON 2014: Playing and Hacking with Digital Latches
 
Password Cracking
Password Cracking Password Cracking
Password Cracking
 
Ethical hacking presentation
Ethical hacking presentationEthical hacking presentation
Ethical hacking presentation
 
Hacking ppt
Hacking pptHacking ppt
Hacking ppt
 
Alphorm.com Formation Hacking et Sécurité , avancé
Alphorm.com Formation Hacking et Sécurité , avancéAlphorm.com Formation Hacking et Sécurité , avancé
Alphorm.com Formation Hacking et Sécurité , avancé
 
Cyber security presentation
Cyber security presentationCyber security presentation
Cyber security presentation
 
Cybercrime.ppt
Cybercrime.pptCybercrime.ppt
Cybercrime.ppt
 
Cyber-crime PPT
Cyber-crime PPTCyber-crime PPT
Cyber-crime PPT
 
Cyber security
Cyber securityCyber security
Cyber security
 

Similar to Recommendations on Blocking Brute Force Attacks

Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...nooralmousa
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultMohammed ALDOUB
 
Developing Secure Web Apps
Developing Secure Web AppsDeveloping Secure Web Apps
Developing Secure Web AppsMark Garratt
 
Engineering Software Products: 7. security and privacy
Engineering Software Products: 7. security and privacyEngineering Software Products: 7. security and privacy
Engineering Software Products: 7. security and privacysoftware-engineering-book
 
Website Hacking and Preventive Measures
Website Hacking and Preventive MeasuresWebsite Hacking and Preventive Measures
Website Hacking and Preventive MeasuresShubham Takode
 
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...IBM Security
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)Kishor Kumar
 
Open source security
Open source securityOpen source security
Open source securitylrigknat
 
Security Best Practices for Bot Builders
Security Best Practices for Bot BuildersSecurity Best Practices for Bot Builders
Security Best Practices for Bot BuildersMax Feldman
 
Don't get stung - an introduction to the OWASP Top 10
Don't get stung - an introduction to the OWASP Top 10Don't get stung - an introduction to the OWASP Top 10
Don't get stung - an introduction to the OWASP Top 10Barry Dorrans
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Moataz Kamel
 
Ruby on Rails Security Guide
Ruby on Rails Security GuideRuby on Rails Security Guide
Ruby on Rails Security Guideihji
 
CIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
CIS14: SCIM: Why It’s More Important, and More Simple, Than You ThinkCIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
CIS14: SCIM: Why It’s More Important, and More Simple, Than You ThinkCloudIDSummit
 
Presentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationPresentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationMd Mahfuzur Rahman
 
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014Kelly Grizzle
 
Prevention of SQL Injection Attack in Web Application with Host Language
Prevention of SQL Injection Attack in Web Application with Host LanguagePrevention of SQL Injection Attack in Web Application with Host Language
Prevention of SQL Injection Attack in Web Application with Host LanguageIRJET Journal
 
Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009mirahman
 
How to measure your security response readiness?
How to measure your security response readiness?How to measure your security response readiness?
How to measure your security response readiness?Tomasz Jakubowski
 

Similar to Recommendations on Blocking Brute Force Attacks (20)

Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by Default
 
Developing Secure Web Apps
Developing Secure Web AppsDeveloping Secure Web Apps
Developing Secure Web Apps
 
Engineering Software Products: 7. security and privacy
Engineering Software Products: 7. security and privacyEngineering Software Products: 7. security and privacy
Engineering Software Products: 7. security and privacy
 
Website Hacking and Preventive Measures
Website Hacking and Preventive MeasuresWebsite Hacking and Preventive Measures
Website Hacking and Preventive Measures
 
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)
 
SecureWV: Exploiting Web APIs
SecureWV: Exploiting Web APIsSecureWV: Exploiting Web APIs
SecureWV: Exploiting Web APIs
 
Open source security
Open source securityOpen source security
Open source security
 
Security Best Practices for Bot Builders
Security Best Practices for Bot BuildersSecurity Best Practices for Bot Builders
Security Best Practices for Bot Builders
 
Don't get stung - an introduction to the OWASP Top 10
Don't get stung - an introduction to the OWASP Top 10Don't get stung - an introduction to the OWASP Top 10
Don't get stung - an introduction to the OWASP Top 10
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
Ruby on Rails Security Guide
Ruby on Rails Security GuideRuby on Rails Security Guide
Ruby on Rails Security Guide
 
CIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
CIS14: SCIM: Why It’s More Important, and More Simple, Than You ThinkCIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
CIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
 
Presentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationPresentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web Application
 
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
 
Prevention of SQL Injection Attack in Web Application with Host Language
Prevention of SQL Injection Attack in Web Application with Host LanguagePrevention of SQL Injection Attack in Web Application with Host Language
Prevention of SQL Injection Attack in Web Application with Host Language
 
Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009
 
How to measure your security response readiness?
How to measure your security response readiness?How to measure your security response readiness?
How to measure your security response readiness?
 

More from Ahmad karawash

Object-Oriented Programming (OOP)
Object-Oriented Programming (OOP)Object-Oriented Programming (OOP)
Object-Oriented Programming (OOP)Ahmad karawash
 
Introduction to-data-science
Introduction to-data-scienceIntroduction to-data-science
Introduction to-data-scienceAhmad karawash
 
How to understand your data
How to understand your dataHow to understand your data
How to understand your dataAhmad karawash
 
Cloud storage with AWS
Cloud storage with AWSCloud storage with AWS
Cloud storage with AWSAhmad karawash
 
Build a custom metrics on aws cloud
Build a custom metrics on aws cloudBuild a custom metrics on aws cloud
Build a custom metrics on aws cloudAhmad karawash
 
Password hashing, salting, bycrpt
Password hashing, salting, bycrptPassword hashing, salting, bycrpt
Password hashing, salting, bycrptAhmad karawash
 
Reasoning of database consistency through description logics
Reasoning of database consistency through description logicsReasoning of database consistency through description logics
Reasoning of database consistency through description logicsAhmad karawash
 
Cloud computing and Service model
Cloud computing and Service modelCloud computing and Service model
Cloud computing and Service modelAhmad karawash
 
From use case to software architecture
From use case to software architectureFrom use case to software architecture
From use case to software architectureAhmad karawash
 

More from Ahmad karawash (10)

Object-Oriented Programming (OOP)
Object-Oriented Programming (OOP)Object-Oriented Programming (OOP)
Object-Oriented Programming (OOP)
 
Introduction to-data-science
Introduction to-data-scienceIntroduction to-data-science
Introduction to-data-science
 
How to understand your data
How to understand your dataHow to understand your data
How to understand your data
 
Cloud storage with AWS
Cloud storage with AWSCloud storage with AWS
Cloud storage with AWS
 
Message queues
Message queuesMessage queues
Message queues
 
Build a custom metrics on aws cloud
Build a custom metrics on aws cloudBuild a custom metrics on aws cloud
Build a custom metrics on aws cloud
 
Password hashing, salting, bycrpt
Password hashing, salting, bycrptPassword hashing, salting, bycrpt
Password hashing, salting, bycrpt
 
Reasoning of database consistency through description logics
Reasoning of database consistency through description logicsReasoning of database consistency through description logics
Reasoning of database consistency through description logics
 
Cloud computing and Service model
Cloud computing and Service modelCloud computing and Service model
Cloud computing and Service model
 
From use case to software architecture
From use case to software architectureFrom use case to software architecture
From use case to software architecture
 

Recently uploaded

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Recommendations on Blocking Brute Force Attacks

  • 1. Recommendations on the Brute Force Attack Ahmad Karawash PhD in Technology of Information, Book Editor, CCA, Latece, ACM & IEEE member 12/17/2015 1
  • 2. Definition A Brute Force attack is a method or an algorithm to determine a password or user name using an automatic process. 12/17/2015 2
  • 3. Way of work • A Brute Force Attack simply uses the cryptography algorithm. • hackers know that the password and user name are stored in a database. • when we attempt to login and our page request is sent from the server to the client machine hackers are more active to access the account. • they attempt all possible combinations to unlock it. • There is a computer program that runs automatically to get the password. 12/17/2015 3
  • 4. Role of key combination and length in the password 12/17/2015 4
  • 6. Real Hack Example: Wordpress 12/17/2015 6
  • 7. Blocking of Brut force Attack • Locking Account • Delay the login process • Block the hacker IP • CAPTCHAs Code Use 12/17/2015 7
  • 8. Locking Account • if a user attempts a wrong password many times then the user's account will be blocked for a given time of period. • Ex: outlook accounts are locked after a wrong password tries. • Drawbacks: • If an attacker attempts a Brute Force Attack on many accounts then a Denial of Services (DOS) problem emerges. • If a attackers want to lock an account then he continues to hit that account and the resultant admin is again locked from the account. 12/17/2015 8
  • 9. Delay the login process • Increasing time delay for login to stop bruteforcing • Example: • Time_nanosleep(0, (50000000*$failed_attempts)); • More attempts a hacker uses to guess a password, more time does it take to check every time. After checking a 100 passwords he must wait 5 sec between each try. • Drawback: • You should try not to use Sleep() because it uses CPU cycles, and if you have a brute force attack from 10,000 IP addresses you will fork 10,000 sleep() child process or threads, this will cause load on your server. 12/17/2015 9
  • 10. Delay the login process • Drawbacks: • Haytham Douaihy, Senior software engineer at Sword Group: “You should try not to use Sleep() because it uses CPU cycles, and if you have a brute force attack from 10,000 IP addresses you will fork 10,000 sleep() child process or threads, this will cause load on your server”. • There are a lot of companies developing protection tools based and benefit from the brute force strategy to sell there own protection softwares. Tools examples: Aircrack-ng, John the Ripper, Rainbow Crack, Cain and Abel, …etc 12/17/2015 10
  • 11. Example Delay code, reduce the number of guessed login attempts possible by a hacker from thousands per minute down to only a few before the delay becomes so long as to make it a pointless exercise, after 20 failed login attempts the delay is 6 days! [HttpPost] public async Task<ActionResult> Login(LoginViewModel viewModel, string returnUrl) { // incremental delay to prevent brute force attacks int incrementalDelay; if (HttpContext.Application[Request.UserHostAddress] != null) { // wait for delay if there is one incrementalDelay = (int)HttpContext.Application[Request.UserHostAddress]; await Task.Delay(incrementalDelay * 1000); } if (!ModelState.IsValid) return View(); // authenticate user var user = _userService.Authenticate(viewModel.Username, viewModel.Password); if (user == null) { // login failed // increment the delay on failed login attempts if (HttpContext.Application[Request.UserHostAddress] == null) { incrementalDelay = 1; } else { incrementalDelay = (int)HttpContext.Application[Request.UserHostAddress] * 2; } HttpContext.Application[Request.UserHostAddress] = incrementalDelay; // return view with error ModelState.AddModelError("", "The user name or password provided is incorrect."); return View(); } // login success // reset incremental delay on successful login if (HttpContext.Application[Request.UserHostAddress] != null) { HttpContext.Application.Remove(Request.UserHostAddress); } // set authentication cookie _formsAuthenticationService.SetAuthCookie( user.Username, viewModel.KeepMeLoggedIn, null); // redirect to returnUrl return Redirect(returnUrl); } 12/17/2015 11
  • 12. Block the hacker IP • Simply block the IP address where the brute force attack comes. • Some companies avoid to use this way because sometimes a user might forget his password and tries to login several times. But the result is that the server deal with him as a hacker and blocks his IP. • Code Example: Function block_ip($ip){ $deny = array(“$ip”); If(in array ($_SERVER[‘REMOTE_ADDR’], $deny)){ Header(“HTTP/1.1 403 Forbidden”); Exit(); } } 12/17/2015 12
  • 13. CAPTCHAs Code Use • A CAPTCHA code is a technique by which we recognize a computer or a human, by making some questions or images or numbers, the answer of which is not submitted by the computer automatically. • Most of the companies prefer this strategy to avoid bruteforce attacks and avoid overwhelmed use of sleep() method that effect server performance negatively. 12/17/2015 13
  • 14. Recommendations • Based on the research I have done and based on my security experience, I recommend not to use the delay strategy but the Captchas one. • Sometimes you find the server weak, this because there are a lot of brute force attacks and the servers CPU have to run a big number of sleep(); functions. 12/17/2015 14
  • 15. Recommendations • Also, technically you can not avoid thousands of Login tries by delaying the repeated ones from single IP that is because using cloud nowadays hackers have the facilities to use thousands of virtual IPs. • So if you publish your application on local server, its CPU is fully loaded by sleep(); calls. • And if you publish your application on the cloud, you might pay more money. 12/17/2015 15
  • 16. Recommendations • [How to Stay in Control of Cloud Sites Resource Costs Overages by Jereme Hancock | Aug 28, 2015 |]: “Brute force attacks against unprotect contact forms or logins. Malicious attacks often target login and contact forms in order to penetrate a site. Repeated, constant attacks on unprotected sites drive up compute cycles as the infrastructure processes each attempt. Many plugins are available to provide contact form and login protection and can mitigate the processing of illegitimate traffic. Captchas are very popular for addressing this threat”. 12/17/2015 16