SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Brute-Forced
in Sixty
Seconds ptsecurity.com
Nikolay
Anisenya
nanisenya@ptsecurity.com
What will be discussed
What will be discussed
ptsecurity.com
Pentesters often deal with
corporative services (mail, portal,
etc.) which exposes only
authorization form and the rest part
is accessible only for authorized
users.
In case the service has fairly safe
authorization form the only way to
fully explore the application is to
have correct login/password pair.
What will be discussed
ptsecurity.com
Getting login/password pair for
online service
Ask customer
Social
Engineering
Cracking
login/password
pairs brute forcing
username listing/enumeration or
have some from open sources
brute force attack
dictionary attack
network bandwidth
server performance
account lockouts
tarpitting
detection in logs and IDS
changing passwords
Online password cracking
issues to consider
Which one
to use?
Too slow, need
to speed up
What will be discussed
ptsecurity.com
Getting login/password pair for
online service
Ask customer
Social
Engineering
Cracking
login/password
pairs brute forcing
username listing/enumeration or
have some from open sources
brute force attack
dictionary attack
network bandwidth
server performance
account lockouts
tarpitting
detection in logs and IDS
changing passwords
Online password cracking
issues to consider
Which one
to use?
Too slow, need
to speed up
What will be discussed
ptsecurity.com
Wordlists: which one to use? Wordlist should:
- be large enough to increase probability of
successful attack
- be small enough to
- complete attack in time
- not lead to account lockouts
- make attack harder for detecting
- meet password policy requirements of the
service
In other words, the wordlist should contain only
suitable passwords most likely to be used.
Our goal is to get at least 1 valid
login/password pair with a minimum
number of requests
Minimize size
&
Maximize density
Minimize size & Maximize density
ptsecurity.com
Maximize high probable
passwords density
Minimize dictionary size
Small wordlists: top100, top500, etc.
Wordlists with count
Heuristic methods – just guessing and improvisation!
Generate dictionary using password rules lists
Generate sorted password rules list
Use existing wordlists
Or make your own
Heuristic methods:
The story of ZAQ!
Heuristic methods: the story of ZAQ!
ptsecurity.com
Hi! I’m Zack
But it’s
a completely
different story
Heuristic methods: the story of ZAQ!
ptsecurity.com
ZAQ!xsw2
Pentest.
Was given an account with default password:
ZAQ!xsw2
What if there is someone else who uses the same
password?
15/500 users do
Not bad, but what if…
1
1 2
Heuristic methods: the story of ZAQ!
ptsecurity.com
What if there are more tricky users and they have
changed the combination rule slightly?
21
2 1 1 2
1
1 2
Tried only suitable of all possible variations of these
rules. 15 passwords total. And what?
+10/500 users are OWNED
Maybe there are few more?
Few more similar keyboard combinations and their
variations.
It took more time to try about 6000 combinations
against each user. The result was not so cool but
+3/500 accounts are compromised
Thanks to creative users
1 2 1 23 4
Heuristic methods: the story of ZAQ!
ptsecurity.com
1
∉ZAQ!xsw2
and other 15 candidates
15
10
3
Summary Interesting facts
KeyboardCombinations.txt
9801
lines
…
zaq1zaq1
zaq1xsw2
…
63`941
`069
lines
∈ZAQ!xsw2
and other 15 candidates
In some cases you can test your heuristic offline
realhuman_phill.txt
Password rules
Someone already has
ptsecurity.com
In our universe In parallel universe
People use the same username modification rules
when register to pick the free one.
What if they use the same password modification
rules to meet password policy requirements?
Password rules
ptsecurity.com
Hashcat password rules example
Name Function Description Example Rule Input Word Output Word
Nothing : Do nothing : password password
Lowercase l
Lowercase all
letters
l AlicE alice
Capitalize c
Capitalize the
first letter and
lower the rest
c paSSwoRd Password
Append
Character
$X
Append character
X to end
$1 qwerty qwerty1
Replace sXY
Replace all
instances of X
with Y
ss$ Password Pa$$word
Duplicate last N ZN
Dulicates last
character N times
Z2 hackmeplz hackmeplzzz
Password rules
ptsecurity.com
You can take sorted rule file
$<space>
l
$1
i4
i5
c
t
i3
i6
$2
and base words file
password
nikolay
qwerty
password
password
password1
pass word
passw ord
Password
PASSWORD
pas sword
passwo rd
password2
nikolay
nikolay
nikolay1
niko lay
nikol ay
Nikolay
NIKOLAY
nik olay
nikola y
nikolay2
qwerty
qwerty
qwerty1
qwer ty
qwert y
Qwerty
QWERTY
qwe rty
qwerty
qwerty2
Then generate wordlist applying
each rule to each base word.
- <space> character
Password rules problems
ptsecurity.com
- Available password rule lists are mostly handmade.
Only several of them are grouped or sorted.
- Common rule generation methods (from password
masks or random rules) take a lot of time and
computational resources. They also have a lot of
garbage in the result.
- Truly powerful password rule lists are kept in secret.
Password templates
How most people create their passwords
ptsecurity.com
Steps Example
1. Choose the base: word, number, name,
date, etc.
2. Modify base: capitalize, lowercase,
substitue, …
3. Choose prefix
4. Choose suffixes
5. Choose postfix
1. Base = {password}
2. password -> P@ssw0rd
3. Prefix = zZz
4. Postfix = xXx
Result: zZzP@ssw0rdxXx
1. Base = {nikolay,18.05.1992}
2. nikolay -> Nikolay
18.05.1992 -> may1992
3. Prefix = qwe
4. Suffix = !
Result: qweNikolay!may1992
Assume that password is not random and not a
keyboard combination
Password templates
ptsecurity.com
Consider the simple case: the base consists of a
single word.
Suppose we have the following password
dictionary:
madIson123
1viKING
internet1
Sandra123
qwerty123
Knights
Natasha12
maggie1
hello1
pAssw0rd1
1RainBow
turtles
CowBoys
lucky12
abdullah1
qwertyuiop1
matthews
WaRrIoRs
SuperMan1
DRAGon1
julia1
sTUPIDs
1adidas
1RUSSIA
dolphins
mASTER1
Now we need list of common words – base
words. Then cut out them from each password in
dictionary.
Ideally we need to cut out as much as possible
modifications of base words but for simplicity
let’s do this only for case modifications.
(***)123
1(***)
(***)1
(***)123
qwerty123
(***)s
(***)12
(***)1
(***)1
pAssw0rd1
1(***)
(***)s
(***)s
(***)12
(***)1
qwertyuiop1
(***)s
(***)s
(***)1
(***)1
(***)1
(***)s
1(***)
1(***)
(***)s
(***)1
Password templates
ptsecurity.com
(***)123
1(***)
(***)1
(***)123
qwerty123
(***)s
(***)12
(***)1
(***)1
pAssw0rd1
1(***)
(***)s
(***)s
(***)12
(***)1
qwertyuiop1
(***)s
(***)s
(***)1
(***)1
(***)1
(***)s
1(***)
1(***)
(***)s
(***)1
(***)123
(***)123
1(***)
1(***)
1(***)
1(***)
(***)s
(***)s
(***)s
(***)s
(***)s
(***)s
(***)s
(***)12
(***)12
(***)1
(***)1
(***)1
(***)1
(***)1
(***)1
(***)1
(***)1
Remove passwords which do not contain words
from dictionary and their simple modifications
Group the rest lines, count lines in each group
and sort in descending order
8 (***)1
7 (***)s
4 1(***)
2 (***)123
2 (***)12
Password templates to rules
ptsecurity.com
Then translate result templates to hashcat
password rule language
Count Template Rule Description
8 (***)1 $1 Append 1
7 (***)s $s Append s
4 1(***) ^1 Prepend 1
2 (***)123 $1 $2 $3 Append 123
2 (***)12 $1 $2 Append 12
We can do the same for base word
modifications
Count Example Rule Description
10 hello : Do nothing
3 Sandra c
Capitalize
the first
letter
2 mASTER C
Invert
capitalize
Rules with count 1 are ignored
Password templates to rules
ptsecurity.com
Count Template Rule Description
8 (***)1 $1 Append 1
7 (***)s $s Append s
4 1(***) ^1 Prepend 1
2 (***)123 $1 $2 $3 Append 123
2 (***)12 $1 $2 Append 12
Count Example Rule Description
10 hello : Do nothing
3 Sandra c
Capitalize
the first
letter
2 mASTER C
Invert
capitalize
Preference
Score
Rule
80 : $1
70 : $s
40 : ^1
24 c $1
21 c $s
20 : $1 $2 $3
20 : $1 $2
16 C $1
14 C $s
12 c ^1
... ...
×
Some base words statistics
ptsecurity.com
0
500
1000
1500
2000
2500
3000
10
20
30
40
50
100Words of “top-500-pass.txt” in 1
million passwords wordlist
Rating position
0
500
1000
1500
10
20
30
40
50
100
Names in 1 million passwords
wordlist
Passwords
Rating position
Passwords
Base words distribution
Top 10
names
yankee
william
angel
james
young
power
david
sasha
happy
chris
Top 10 words of
top-500-pass.txt
2000
love
12345
wolf
pass
william
star
chris
king
123456
Other
Names
5-30%
top-500-pass.txt
8-10%
Corporate logins often contain last names and initials. It’s
not difficult to find full names and other personal data in
social networks. We can use them as base words in rule-
based attack.
Generated rules analysis
ptsecurity.com
0
100
200
300
400
500
600
700
800
900
1000
10
20
30
40
50
100
top-500-pass.txt and name
templates (prefixes/postfixes)
preference comparison
Passwords
Rating position
Top500 templates are sorted
in descending order.
Name templates list contains
Top500-specific templates with
password number of 0. Name
templates are sorted in Top500
templates list order.
Case modification rules distribution
Top 10 password rules Example
Rule Description Base word Password
l $1 Lowercase, append 1 password password1
l $s Lowercase, append s dragon dragons
l $2 Lowercase, append 2 dolphin dolphin2
l ^1 Lowercase, prepend 1 Nikolay 1nikolay
c $1 Capitalize, append 1 welcome Welcome1
u $1 Uppercase, append 1 William WILLIAM1
c $s Capitalize, append s king Kings
c $2 Capitalize, append 2 pass Pass2
c ^1 Capitalize, prepend 1 James James1
u $s Uppercase, append s Yankee YANKEES
... ... ... ...
Uppercase
2.7%
Other
1.3%
Capitalize
8%
Lowercase
88%
Brute-Forced
in Sixty
Seconds
ptsecurity.com
Thank you!
Any questions?
Take small base word
list
Prepare password
rules lists
Collect additional
information about
victims
Test locally user-
independent wordlists
on large dictionary
Crack online
Generate both user-
dependent and user-
independent wordlists

Weitere ähnliche Inhalte

Was ist angesagt?

Francisco Jesús Gómez + Carlos Juan Diaz - Cloud Malware Distribution: DNS wi...
Francisco Jesús Gómez + Carlos Juan Diaz - Cloud Malware Distribution: DNS wi...Francisco Jesús Gómez + Carlos Juan Diaz - Cloud Malware Distribution: DNS wi...
Francisco Jesús Gómez + Carlos Juan Diaz - Cloud Malware Distribution: DNS wi...
RootedCON
 
Wtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_publicWtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_public
Jaime Blasco
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented feature
Cyber Security Alliance
 
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ..."Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
PROIDEA
 

Was ist angesagt? (20)

Passwords presentation
Passwords presentationPasswords presentation
Passwords presentation
 
NSC #2 - D2 02 - Benjamin Delpy - Mimikatz
NSC #2 - D2 02 - Benjamin Delpy - MimikatzNSC #2 - D2 02 - Benjamin Delpy - Mimikatz
NSC #2 - D2 02 - Benjamin Delpy - Mimikatz
 
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
 
Francisco Jesús Gómez + Carlos Juan Diaz - Cloud Malware Distribution: DNS wi...
Francisco Jesús Gómez + Carlos Juan Diaz - Cloud Malware Distribution: DNS wi...Francisco Jesús Gómez + Carlos Juan Diaz - Cloud Malware Distribution: DNS wi...
Francisco Jesús Gómez + Carlos Juan Diaz - Cloud Malware Distribution: DNS wi...
 
Wtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_publicWtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_public
 
Статический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLСтатический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDL
 
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
 
Password Storage and Attacking in PHP
Password Storage and Attacking in PHPPassword Storage and Attacking in PHP
Password Storage and Attacking in PHP
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented feature
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ..."Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
 
Password Storage And Attacking In PHP - PHP Argentina
Password Storage And Attacking In PHP - PHP ArgentinaPassword Storage And Attacking In PHP - PHP Argentina
Password Storage And Attacking In PHP - PHP Argentina
 
OpenSSL Basic Function Call Flow
OpenSSL Basic Function Call FlowOpenSSL Basic Function Call Flow
OpenSSL Basic Function Call Flow
 
"Powershell kung-fu" - Paweł Maziarz
"Powershell kung-fu" - Paweł Maziarz"Powershell kung-fu" - Paweł Maziarz
"Powershell kung-fu" - Paweł Maziarz
 
44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar
 
Introduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmmIntroduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmm
 
Analysis of mass SQL injection attacks
Analysis of mass SQL injection attacksAnalysis of mass SQL injection attacks
Analysis of mass SQL injection attacks
 
Hack ASP.NET website
Hack ASP.NET websiteHack ASP.NET website
Hack ASP.NET website
 
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
 
"A rootkits writer’s guide to defense" - Michal Purzynski
"A rootkits writer’s guide to defense" - Michal Purzynski"A rootkits writer’s guide to defense" - Michal Purzynski
"A rootkits writer’s guide to defense" - Michal Purzynski
 

Andere mochten auch

Andere mochten auch (20)

Псевдобезопасность NFC-сервисов
Псевдобезопасность NFC-сервисовПсевдобезопасность NFC-сервисов
Псевдобезопасность NFC-сервисов
 
Magic Box, или Как пришлось сломать банкоматы, чтобы их спасти
Magic Box, или Как пришлось сломать банкоматы, чтобы их спастиMagic Box, или Как пришлось сломать банкоматы, чтобы их спасти
Magic Box, или Как пришлось сломать банкоматы, чтобы их спасти
 
NFC: Naked Fried Chicken / Пентест NFC — вот что я люблю
NFC: Naked Fried Chicken / Пентест NFC — вот что я люблюNFC: Naked Fried Chicken / Пентест NFC — вот что я люблю
NFC: Naked Fried Chicken / Пентест NFC — вот что я люблю
 
Вирусы есть? А если найду?
Вирусы есть? А если найду?Вирусы есть? А если найду?
Вирусы есть? А если найду?
 
Использование KASan для автономного гипервизора
Использование KASan для автономного гипервизораИспользование KASan для автономного гипервизора
Использование KASan для автономного гипервизора
 
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Laterjohn-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
 
Строим ханипот и выявляем DDoS-атаки
Строим ханипот и выявляем DDoS-атакиСтроим ханипот и выявляем DDoS-атаки
Строим ханипот и выявляем DDoS-атаки
 
Страх и ненависть в телеком-операторах
Страх и ненависть в телеком-операторахСтрах и ненависть в телеком-операторах
Страх и ненависть в телеком-операторах
 
Мобильная связь небезопасна. Аргументы, подкрепленные фактами
Мобильная связь небезопасна. Аргументы, подкрепленные фактамиМобильная связь небезопасна. Аргументы, подкрепленные фактами
Мобильная связь небезопасна. Аргументы, подкрепленные фактами
 
Метод машинного обучения для распознавания сгенерированных доменных имен
Метод машинного обучения для распознавания сгенерированных доменных именМетод машинного обучения для распознавания сгенерированных доменных имен
Метод машинного обучения для распознавания сгенерированных доменных имен
 
Город никогда не спит / The City Never Sleeps
Город никогда не спит / The City Never SleepsГород никогда не спит / The City Never Sleeps
Город никогда не спит / The City Never Sleeps
 
Целевые атаки: прицелься первым
Целевые атаки: прицелься первымЦелевые атаки: прицелься первым
Целевые атаки: прицелься первым
 
Как начать бизнес в ИБ
Как начать бизнес в ИБКак начать бизнес в ИБ
Как начать бизнес в ИБ
 
Flash умер. Да здравствует Flash!
Flash умер. Да здравствует Flash!Flash умер. Да здравствует Flash!
Flash умер. Да здравствует Flash!
 
Восток — дело тонкое, или Уязвимости медицинского и индустриального ПО
Восток — дело тонкое, или Уязвимости медицинского и индустриального ПОВосток — дело тонкое, или Уязвимости медицинского и индустриального ПО
Восток — дело тонкое, или Уязвимости медицинского и индустриального ПО
 
Fingerprinting and Attacking a Healthcare Infrastructure
Fingerprinting and Attacking a Healthcare InfrastructureFingerprinting and Attacking a Healthcare Infrastructure
Fingerprinting and Attacking a Healthcare Infrastructure
 
Аспекты деятельности инсайдеров на предприятии
Аспекты деятельности инсайдеров на предприятииАспекты деятельности инсайдеров на предприятии
Аспекты деятельности инсайдеров на предприятии
 
Janitor to CISO in 360 Seconds: Exploiting Mechanical Privilege Escalation
Janitor to CISO in 360 Seconds: Exploiting Mechanical Privilege EscalationJanitor to CISO in 360 Seconds: Exploiting Mechanical Privilege Escalation
Janitor to CISO in 360 Seconds: Exploiting Mechanical Privilege Escalation
 
Перехват беспроводных гаджетов — от квадрокоптеров до мышек
Перехват беспроводных гаджетов — от квадрокоптеров до мышекПерехват беспроводных гаджетов — от квадрокоптеров до мышек
Перехват беспроводных гаджетов — от квадрокоптеров до мышек
 
Боремся с читингом в онлайн-играх
Боремся с читингом в онлайн-играхБоремся с читингом в онлайн-играх
Боремся с читингом в онлайн-играх
 

Ähnlich wie Угадываем пароль за минуту

Patterns for organic architecture codedive
Patterns for organic architecture codedivePatterns for organic architecture codedive
Patterns for organic architecture codedive
magda3695
 

Ähnlich wie Угадываем пароль за минуту (20)

The problem with the real world
The problem with the real worldThe problem with the real world
The problem with the real world
 
Locking Down Your MySQL Database.pptx
Locking Down Your MySQL Database.pptxLocking Down Your MySQL Database.pptx
Locking Down Your MySQL Database.pptx
 
P@ssw0rds
P@ssw0rdsP@ssw0rds
P@ssw0rds
 
Chapter 4 access control fundamental ii
Chapter 4   access control fundamental iiChapter 4   access control fundamental ii
Chapter 4 access control fundamental ii
 
Building an Analytic Extension to MySQL with ClickHouse and Open Source
Building an Analytic Extension to MySQL with ClickHouse and Open SourceBuilding an Analytic Extension to MySQL with ClickHouse and Open Source
Building an Analytic Extension to MySQL with ClickHouse and Open Source
 
Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptx
Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptxBuilding an Analytic Extension to MySQL with ClickHouse and Open Source.pptx
Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptx
 
PASSWORD BEST PRACTICES
PASSWORD BEST PRACTICESPASSWORD BEST PRACTICES
PASSWORD BEST PRACTICES
 
Cassandra & puppet, scaling data at $15 per month
Cassandra & puppet, scaling data at $15 per monthCassandra & puppet, scaling data at $15 per month
Cassandra & puppet, scaling data at $15 per month
 
Postgres index types
Postgres index typesPostgres index types
Postgres index types
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++
 
Patterns for organic architecture codedive
Patterns for organic architecture codedivePatterns for organic architecture codedive
Patterns for organic architecture codedive
 
The Art of Clean code
The Art of Clean codeThe Art of Clean code
The Art of Clean code
 
Network security
Network security Network security
Network security
 
Defending Against Attacks With Rails
Defending Against Attacks With RailsDefending Against Attacks With Rails
Defending Against Attacks With Rails
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
String Comparison Surprises: Did Postgres lose my data?
String Comparison Surprises: Did Postgres lose my data?String Comparison Surprises: Did Postgres lose my data?
String Comparison Surprises: Did Postgres lose my data?
 
Password and Account Management Strategies - April 2019
Password and Account Management Strategies - April 2019Password and Account Management Strategies - April 2019
Password and Account Management Strategies - April 2019
 
Network security
Network securityNetwork security
Network security
 

Mehr von Positive Hack Days

Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
Positive Hack Days
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
Positive Hack Days
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Positive Hack Days
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
Positive Hack Days
 

Mehr von Positive Hack Days (20)

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows Docker
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive Technologies
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + Qlik
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQube
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps Community
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для Approof
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложений
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application Security
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 лет
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПО
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке Си
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опыт
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services Center
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атаки
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Угадываем пароль за минуту

  • 2. What will be discussed
  • 3. What will be discussed ptsecurity.com Pentesters often deal with corporative services (mail, portal, etc.) which exposes only authorization form and the rest part is accessible only for authorized users. In case the service has fairly safe authorization form the only way to fully explore the application is to have correct login/password pair.
  • 4. What will be discussed ptsecurity.com Getting login/password pair for online service Ask customer Social Engineering Cracking login/password pairs brute forcing username listing/enumeration or have some from open sources brute force attack dictionary attack network bandwidth server performance account lockouts tarpitting detection in logs and IDS changing passwords Online password cracking issues to consider Which one to use? Too slow, need to speed up
  • 5. What will be discussed ptsecurity.com Getting login/password pair for online service Ask customer Social Engineering Cracking login/password pairs brute forcing username listing/enumeration or have some from open sources brute force attack dictionary attack network bandwidth server performance account lockouts tarpitting detection in logs and IDS changing passwords Online password cracking issues to consider Which one to use? Too slow, need to speed up
  • 6. What will be discussed ptsecurity.com Wordlists: which one to use? Wordlist should: - be large enough to increase probability of successful attack - be small enough to - complete attack in time - not lead to account lockouts - make attack harder for detecting - meet password policy requirements of the service In other words, the wordlist should contain only suitable passwords most likely to be used. Our goal is to get at least 1 valid login/password pair with a minimum number of requests
  • 8. Minimize size & Maximize density ptsecurity.com Maximize high probable passwords density Minimize dictionary size Small wordlists: top100, top500, etc. Wordlists with count Heuristic methods – just guessing and improvisation! Generate dictionary using password rules lists Generate sorted password rules list Use existing wordlists Or make your own
  • 10. Heuristic methods: the story of ZAQ! ptsecurity.com Hi! I’m Zack But it’s a completely different story
  • 11. Heuristic methods: the story of ZAQ! ptsecurity.com ZAQ!xsw2 Pentest. Was given an account with default password: ZAQ!xsw2 What if there is someone else who uses the same password? 15/500 users do Not bad, but what if… 1 1 2
  • 12. Heuristic methods: the story of ZAQ! ptsecurity.com What if there are more tricky users and they have changed the combination rule slightly? 21 2 1 1 2 1 1 2 Tried only suitable of all possible variations of these rules. 15 passwords total. And what? +10/500 users are OWNED Maybe there are few more? Few more similar keyboard combinations and their variations. It took more time to try about 6000 combinations against each user. The result was not so cool but +3/500 accounts are compromised Thanks to creative users 1 2 1 23 4
  • 13. Heuristic methods: the story of ZAQ! ptsecurity.com 1 ∉ZAQ!xsw2 and other 15 candidates 15 10 3 Summary Interesting facts KeyboardCombinations.txt 9801 lines … zaq1zaq1 zaq1xsw2 … 63`941 `069 lines ∈ZAQ!xsw2 and other 15 candidates In some cases you can test your heuristic offline realhuman_phill.txt
  • 15. Someone already has ptsecurity.com In our universe In parallel universe People use the same username modification rules when register to pick the free one. What if they use the same password modification rules to meet password policy requirements?
  • 16. Password rules ptsecurity.com Hashcat password rules example Name Function Description Example Rule Input Word Output Word Nothing : Do nothing : password password Lowercase l Lowercase all letters l AlicE alice Capitalize c Capitalize the first letter and lower the rest c paSSwoRd Password Append Character $X Append character X to end $1 qwerty qwerty1 Replace sXY Replace all instances of X with Y ss$ Password Pa$$word Duplicate last N ZN Dulicates last character N times Z2 hackmeplz hackmeplzzz
  • 17. Password rules ptsecurity.com You can take sorted rule file $<space> l $1 i4 i5 c t i3 i6 $2 and base words file password nikolay qwerty password password password1 pass word passw ord Password PASSWORD pas sword passwo rd password2 nikolay nikolay nikolay1 niko lay nikol ay Nikolay NIKOLAY nik olay nikola y nikolay2 qwerty qwerty qwerty1 qwer ty qwert y Qwerty QWERTY qwe rty qwerty qwerty2 Then generate wordlist applying each rule to each base word. - <space> character
  • 18. Password rules problems ptsecurity.com - Available password rule lists are mostly handmade. Only several of them are grouped or sorted. - Common rule generation methods (from password masks or random rules) take a lot of time and computational resources. They also have a lot of garbage in the result. - Truly powerful password rule lists are kept in secret.
  • 20. How most people create their passwords ptsecurity.com Steps Example 1. Choose the base: word, number, name, date, etc. 2. Modify base: capitalize, lowercase, substitue, … 3. Choose prefix 4. Choose suffixes 5. Choose postfix 1. Base = {password} 2. password -> P@ssw0rd 3. Prefix = zZz 4. Postfix = xXx Result: zZzP@ssw0rdxXx 1. Base = {nikolay,18.05.1992} 2. nikolay -> Nikolay 18.05.1992 -> may1992 3. Prefix = qwe 4. Suffix = ! Result: qweNikolay!may1992 Assume that password is not random and not a keyboard combination
  • 21. Password templates ptsecurity.com Consider the simple case: the base consists of a single word. Suppose we have the following password dictionary: madIson123 1viKING internet1 Sandra123 qwerty123 Knights Natasha12 maggie1 hello1 pAssw0rd1 1RainBow turtles CowBoys lucky12 abdullah1 qwertyuiop1 matthews WaRrIoRs SuperMan1 DRAGon1 julia1 sTUPIDs 1adidas 1RUSSIA dolphins mASTER1 Now we need list of common words – base words. Then cut out them from each password in dictionary. Ideally we need to cut out as much as possible modifications of base words but for simplicity let’s do this only for case modifications. (***)123 1(***) (***)1 (***)123 qwerty123 (***)s (***)12 (***)1 (***)1 pAssw0rd1 1(***) (***)s (***)s (***)12 (***)1 qwertyuiop1 (***)s (***)s (***)1 (***)1 (***)1 (***)s 1(***) 1(***) (***)s (***)1
  • 23. Password templates to rules ptsecurity.com Then translate result templates to hashcat password rule language Count Template Rule Description 8 (***)1 $1 Append 1 7 (***)s $s Append s 4 1(***) ^1 Prepend 1 2 (***)123 $1 $2 $3 Append 123 2 (***)12 $1 $2 Append 12 We can do the same for base word modifications Count Example Rule Description 10 hello : Do nothing 3 Sandra c Capitalize the first letter 2 mASTER C Invert capitalize Rules with count 1 are ignored
  • 24. Password templates to rules ptsecurity.com Count Template Rule Description 8 (***)1 $1 Append 1 7 (***)s $s Append s 4 1(***) ^1 Prepend 1 2 (***)123 $1 $2 $3 Append 123 2 (***)12 $1 $2 Append 12 Count Example Rule Description 10 hello : Do nothing 3 Sandra c Capitalize the first letter 2 mASTER C Invert capitalize Preference Score Rule 80 : $1 70 : $s 40 : ^1 24 c $1 21 c $s 20 : $1 $2 $3 20 : $1 $2 16 C $1 14 C $s 12 c ^1 ... ... ×
  • 25. Some base words statistics ptsecurity.com 0 500 1000 1500 2000 2500 3000 10 20 30 40 50 100Words of “top-500-pass.txt” in 1 million passwords wordlist Rating position 0 500 1000 1500 10 20 30 40 50 100 Names in 1 million passwords wordlist Passwords Rating position Passwords Base words distribution Top 10 names yankee william angel james young power david sasha happy chris Top 10 words of top-500-pass.txt 2000 love 12345 wolf pass william star chris king 123456 Other Names 5-30% top-500-pass.txt 8-10% Corporate logins often contain last names and initials. It’s not difficult to find full names and other personal data in social networks. We can use them as base words in rule- based attack.
  • 26. Generated rules analysis ptsecurity.com 0 100 200 300 400 500 600 700 800 900 1000 10 20 30 40 50 100 top-500-pass.txt and name templates (prefixes/postfixes) preference comparison Passwords Rating position Top500 templates are sorted in descending order. Name templates list contains Top500-specific templates with password number of 0. Name templates are sorted in Top500 templates list order. Case modification rules distribution Top 10 password rules Example Rule Description Base word Password l $1 Lowercase, append 1 password password1 l $s Lowercase, append s dragon dragons l $2 Lowercase, append 2 dolphin dolphin2 l ^1 Lowercase, prepend 1 Nikolay 1nikolay c $1 Capitalize, append 1 welcome Welcome1 u $1 Uppercase, append 1 William WILLIAM1 c $s Capitalize, append s king Kings c $2 Capitalize, append 2 pass Pass2 c ^1 Capitalize, prepend 1 James James1 u $s Uppercase, append s Yankee YANKEES ... ... ... ... Uppercase 2.7% Other 1.3% Capitalize 8% Lowercase 88%
  • 27. Brute-Forced in Sixty Seconds ptsecurity.com Thank you! Any questions? Take small base word list Prepare password rules lists Collect additional information about victims Test locally user- independent wordlists on large dictionary Crack online Generate both user- dependent and user- independent wordlists