SSH Hacking Prevention Guide
Hello all , first things first, use more than 8 or 12 characters damnit! So I have decided to write a short article about SSH Hacking, perhaps I should have really named it SHA-2 hacking, or SSHD hacking or a combination, I’m really not sure. As a lot of you will probably already know , running SSHD on unix was always considered safe for SHA-1 encryption keys, but not too long ago, it was “proven” that 99.9% of SHA-1 was crackable, and that precomputation tables were made for time-memory trade-off cracking; which in short, is a very effective way to break passwords faster. SHA-1 a once powerful hash, is no longer considered strong nor secure. Infact, in most security articles you will find in bold you must use >=SHA-2 hashes (greater than or equal to)
What is SHA?
The SHA (Secure Hash Algorithm) family is a set of related cryptographic hash functions. The most commonly used function in the family, SHA-1, is employed in a large variety of popular security applications and protocols, including TLS, SSL, PGP, SSH, S/MIME, and IPSec. SHA-1 was considered to be the successor to MD5, an earlier, widely-used hash function. Both are reportedly compromised. In some circles, it is suggested that SHA-256 or greater be used for critical technology. The SHA algorithms were designed by the National Security Agency (NSA) and published as a US government standard.
SHA-2
No attacks have yet been reported on the SHA-2 variants, but since they are similar to SHA-1, researchers are worried, and are developing candidates for a new, better hashing standard such as SHA-256 and SHA-512. More about Hash Alogorithms later though!
Real Hack attempts on My Machine yesterday
Recently some of my machines around the internet have been exposed to many hack attempts, some of which, were quite inspiring, if not a little troubling. Of course my security was adequate to stop the user logging in, but their attempts are logged none the less, and I have included a list of some of the usernames they attempted on my machines, in vain. I have since quadrupled the security on the machine, and look forward to posting the usernames that you will find below - that are being used and exploited by such SSHD cracker scripts.
Making SSHD Secure
Here are a list of checkpoints for your sshd_config located in /etc/ssh/ on most machines.
- set port from port 22 to higher random port ####
- port 20309
-
ensure your using protocol 2
- Protcol 2
- Decrease the LoginGraceTime Interval to 120 or lower
- LoginGraceTime 120
- Do not permit root login
- PermitRootLogin no
- Remember these are just basic guidelines, there are many changes you can make in /etc/ssh/ to improve your ssh security. (such as >3des ciphers)
- Also remember not to use short usernames, as the known kiddie-script ssh cracking aliases shown below are generally fairly short or stupid usernames for a person to be using, beware of the stupid sys admin.
- Remember to check your /var/log/auth.log* ’s files they are invaluable to catching hackers.
Random Hacker of the Day Exposé
azio:~# cat /var/log/auth.log | grep illegal user | grep from
Oct 10 10:49:36 localhost sshd[8646]: input_userauth_request: illegal user boris
Boris’ IP was: 218.188.3.152
Hi Boris. Whoever you may be.
A little bit about Boris’ Provider:
inetnum: 218.188.0.0 - 218.189.255.255 netname: HGC descr: Hutchison Global Communications country: HK admin-c: IH17-AP tech-c: IH17-AP mnt-by: APNIC-HM mnt-lower: MAINT-HK-HGCADMIN remarks: included the /17 previous allocation changed: andycw@hgc.com.hk 20040209 status: ALLOCATED PORTABLE changed: hm-changed@apnic.net 20040212 source: APNIC
Over 1000 Known SSHD “Kiddie-Script-Hack” Aliases
- !@#$%
- 007
- 1
- 111111
- 123
- 123123
- 1234
- 12345
- 123456
- 1234567
- 12345678
- 1928
- 1969
- 1q2w3e
- 50cent
- 5683
- 654321
- 666666
- 696969
- 777
- 7777
- 8675309
- 888888
- a
- a12345
- a1b2c3
- a1b2c3d4
- aaa
- aaaaaa
- aaron
- abby
- abc
- abc123
- abcdef
- abira
- absolut
- abuse
- access
- ada
- adabe
- adelina
- adeline
- adidas
- adina
- adm
- adm1
- adm2
- adm3
- adm4
- adm5
- admin
- administrator
- admissio
- adornnyc
- adrian
- adriana
- adschool
- adsens10
- adsense
- alaska
- albert
- alessa
- alex
- alexander
- alexandr
- alexis
- alfred
- ali
- alian
- alice
- alin
- alina
- alissa
- alka
- allyson
- alpha
- amanda
- amavis
- amber
- amivaro
- andra
- andrada
- andrea
- andreas
- andrei
- andrey
- andy
- angel
- angela
- angie
- animal
- anna
- anthony
- apple
- apples
- archie
- arnold
- arrobaho
- art
- arthur
- asdf
- asdfgh
- asdfjkl
- ashley
- ASP
- ASP.NET
- athena
- atila
- august
- austin
- avalon
- awesome
- babylon5
- badger
- bamboo
- bandit
- barbara
- barney
- baseball
- basf
- basketball
- batman
- beagle
- bears
- beatles
- beautiful
- beaver
- beavis
- benjamin
- benny
- berit
- bigmac
- bill
- billy
- bingo
- bird33
- bitch
- biteme
- black
- blazer
- blenche
- blonde
- blue
- bluebird
- bob
- bobby
- bond007
- bonnie
- booboo
- booger
- boogie
- boomer
- boris
- boston
- bouavista
- bpneus
- bradley
- brandon
- brandy
- brenda
- brian
- bright
- bubba
- bubba1
- bubbles
- buddy
- buffy
- buster
- butthead
- button
- buttons
- by
- byozko
- byshekil
- bytmr
- ca
- caagroup
- cactus
- caitlin
- camaro
- camera
- canada
- candy
- captain
- carina
- carlos
- carmen
- caro
- caroline
- carrie
- casey
- casper
- catalog
- catch22
- catherine
- cedru
- challenge
- chance
- charity
- charles
- charlie
- charlotte
- cheese
- chelsea
- cheryl
- chicken
- chloe
- chocolate
- chris
- chris1
- christian
- christin
- christoph
- cindy
- claire
- clancy
- clark
- claudia
- clipper
- coala
- coca
- cocacola
- coffee
- coke
- coltrane
- compaq
- compton
- computer
- congo
- connect
- conrad
- contra
- control
- cooper
- cooter
- copper
- cornelia
- cosmin
- cosmos
- cosmote
- cougar
- cowboy
- cozma
- cozo
- cozo1
- cozo123
- cracker
- crawford
- cricket
- cruise
- crystal
- curtis
- cyclone
- cyrano
- dakota
- dallas
- dan
- dance
- daniel
- danny
- dario
- dave
- david
- david1
- dawn
- dean
- debbie
- delia
- deliver
- delta
- denise
- dennis
- deutsch
- dhana
- diablo
- digital
- dilbert
- dimi
- dimmy
- dirk
- disney
- distins
- doctor
- dog
- dogdayca
- dogspeak
- doina
- dollars
- dolphin
- domainki
- domareal
- dominik
- donald
- dookie
- doom
- dorothy
- douglas
- dragon
- dreamer
- dreams
- duck
- duckie
- duke
- dumbass
- dundee
- dvd
- eagles
- eddie
- edom
- edom1
- edward
- eeyore
- einstein
- eismann
- eismannw
- elephant
- elizabeth
- ellelweb
- elvis
- emberton
- emcad1
- emily
- emsweb
- englishp
- enter
- epro
- eps1
- eric
- eroadmin
- erricson
- esoteric
- etont
- euroalm
- eurofax
- europe
- eurosport
- eurosports
- explorer
- export
- fabian
- faith
- falcon
- family
- fantasti
- fantasti1
- farmer
- fbi
- felix
- ferrari
- filter
- fire
- firebird
- firewall
- fish
- fisher
- fishing
- flamingo
- fletcher
- flip
- flipper
- florian
- flower
- floyd
- fluffy
- foobar
- football
- for
- ford
- fountain
- fox
- foxtrot
- france
- francis
- franklin
- franziska
- freak1
- fred
- freddy
- freedom
- friday
- friend
- friends
- frodo
- frog
- froggy
- ftp1
- ftpftp
- ftptest
- ftpuser
- fucker
- fuckoff
- fullas
- gabriel
- gabriell
- galaxy
- galileo
- gambit
- gandalf
- garden
- garfield
- garlic
- garnet
- genesis
- genius
- george
- giants
- ginger
- gizmo
- global
- godzilla
- goforit
- golf
- golfer
- goober
- goodluck
- goofy
- gopher
- grace
- gramet
- graphics
- grateful
- greateye
- green
- greenday
- gregott
- groovy
- grover
- gs5fb1
- gtool
- guest
- guitar
- hacker
- hammer
- hansolo
- happy
- happy1
- harley
- harmony
- harry
- hazel
- heather
- hector
- hello
- help
- helpme
- hendrix
- henry
- herbert
- herman
- hockey
- homer
- honda
- honey
- hoops
- horizon
- hornet
- horses
- house
- houston
- howard
- hula
- hummer
- hunter
- ice
- icecream
- iceman
- ics
- iguana
- ileana
- iloveyou
- imagine
- impala
- ina
- indiana
- indigo
- info
- info1
- info2
- info3
- info4
- info5
- informix
- ingo
- ingrid
- insane
- inside
- intercon
- internet
- ioana
- ionel
- ionela
- ionica
- irish
- iroman
- ironman
- island
- jachy
- jack
- jake
- james
- jane
- janeben
- janet
- janice
- jasmin
- jasmine
- jason
- jason1
- jasper
- jeanette
- jeanne
- jeffrey
- jenifer
- jenni
- jennifer
- jeremy
- jerry
- jessica
- jesus
- jesus1
- jewels
- jim
- joe
- joel
- joey
- john
- joker
- jonathan
- jordan
- joseph
- joshua
- jubilate
- julian
- julie
- julie1
- junior
- juno
- jupiter
- juro
- justice
- justin
- justin1
- karen
- katherine
- kathleen
- kathrin
- keith
- kelly
- kelly1
- kelsey
- kennedy
- kent
- kermit
- kevin
- kevin1
- keyboard
- killer
- kingfish
- kitty
- kitz
- kitz1
- kitz123
- knicks
- knight
- koala
- komikis
- komikis1
- konforti
- konforti1
- kozalak
- kraft
- kritlow
- kryddbut
- ktaclan
- labs
- lacrosse
- lady
- lakers
- lamas
- lamas1
- laris
- larry
- larry1
- lauren
- ledzep
- lee
- leonard
- leslie
- lestat
- leticia
- letitia
- letmein
- lg
- library
- lili
- lincoln
- linda
- lionking
- lisa
- lizard
- lm
- loading
- loading1
- loading123
- loffi
- logan
- london
- lorenas
- lorenas1
- lorenas123
- louise
- love
- luana
- lucky
- lucky1
- lucy
- luisa
- luke
- lydia
- mada
- maddog
- maddy
- madison
- maggie
- magic
- mailftp
- mailman
- mailtest
- majordomo
- maketour
- mamica
- mandela
- mantra
- manu
- manuel
- manuela
- marcel
- marcus
- margaret
- marian
- marie
- marijke
- marina
- mariposa
- mark
- market
- marlboro
- marley
- martin
- martin1
- marty
- marvin
- mary
- maryjane
- master
- master1
- mathildi
- matrix
- matt
- Matthew
- maverick
- maxim
- mayday
- mazda1
- megaherz
- megaherz1
- melanie
- mensuck
- mercedes
- mercury
- merlin
- metal
- metallic
- michaela
- michel
- mickey
- micro
- midori
- mike
- mikey
- millie
- minnie
- mirage
- missy
- misty
- mitch
- mitchell
- mixit
- mixit1
- mixit123
- mmm
- molly
- molson
- mom
- monday
- monet
- money
- money1
- monica
- monkey
- monopoly
- mookie
- moose
- morgan
- moroni
- mother
- motorola
- mountain
- mouse
- muffin
- murphy
- music
- mustang
- nadine
- nancy
- naomi
- nascar
- natalia
- natasha
- nathan
- ncc1701
- ncc1701d
- ncc1701e
- nelson
- nesbitt
- netware
- nevada
- newpass
- newuser
- newwayto
- newyork
- nfls
- nguyen
- nheen
- nhtogo
- nicholas
- nicole
- niko
- nils
- nimrod
- nina
- niners
- nirtech
- nirtech1
- nirvana
- nokia
- none
- nothing
- ocdoo
- october
- odan
- olive
- oliver
- olivia
- omereila
- one
- online
- open
- oracle
- orange
- oscar
- OU812
- oxana
- oxford
- pacific
- painter
- pamela
- panasonic
- pangeea
- pantera
- papaye
- paris
- parker
- passwd
- password
- pat
- patricia
- patrick
- paul
- peace
- peaches
- peanut
- pearljam
- penelope
- penguin
- pentium
- pepper
- pepsi
- peru
- pete
- peter
- petunia
- phantom
- phil
- philip
- philipp
- phish
- phoenix
- phoenix1
- photo
- photonx
- piano
- pickle
- picture
- pierre
- piglet
- pionner
- pit
- pizza
- player
- please
- poiana
- poiuyt
- poohbear
- pookie
- popcorn
- popey
- popey1
- popey123
- porsche
- porsche911
- porter
- ppp
- praga
- presiden
- prince
- princess
- psycho
- pumpkin
- punkin
- purple
- PuTTYPuTTYPuTTYPuTTYPuTTYfirebird
- pyramid
- qwerty
- rabbit
- rabia
- rachel
- rain
- rainbow
- randy
- ranger
- rascal
- ray1
- raymond
- rayone
- rebecca
- rebelde
- red
- redbul
- redbull
- reddog
- richard
- robert
- robin
- roces
- rocket
- rocky
- roger
- romina
- ronny
- rose
- rosebud
- roses
- route66
- roxana
- roxi
- roxy
- royal
- royalking
- running
- ruxandra
- sabrina
- sadie
- sales
- salmon
- sam
- samson
- sandra
- sandro
- sandy
- sara
- sarah
- sarikaya
- sas
- sascha
- sasha
- sassysam
- sastrade
- saturn
- sauberb
- savebiz
- school
- school1
- scooter
- scott
- security
- sergei
- service
- serwis
- shadow
- shalom
- shannon
- sharon
- sheena
- sheila
- shithead
- show
- siemens
- sierra
- silver
- simi
- simina
- simona
- simone
- sinja
- sinteza
- sirus
- sivan
- sivan1
- sivan123
- skeeter
- skiing
- skippy
- smile
- smokey
- snapple
- snoopy
- snowball
- soccer
- sophie
- sorin
- sorina
- sparky
- sparrow
- special
- spencer
- spike
- spring
- stanley
- star
- startrek
- static
- stealth
- steelers
- stefana
- stephan
- stephanie
- stephen
- steve
- steven
- stick
- stick1
- stimpy
- struf
- student
- success
- summer
- sun
- sunflower
- sunny
- sunshine
- superman
- support
- susanne
- sven
- sweetie
- sydney
- sylvia
- systuser
- tamara
- tanja
- tara
- Taurus
- taylor
- teacher
- tech
- techno
- telecom
- tennis
- teresa
- termopan
- test
- test1
- test123
- testing
- theresa
- thomas
- thunderbird
- thx1138
- tiger
- tigers
- tigger
- tim
- tina
- tino
- tir
- tma
- tobi
- toddste
- togo
- tomadmin
- tommy
- tonses
- tony
- topgun
- topliner
- toyota
- training
- travel
- tristan
- trium
- truck
- trustno1
- tuesday
- ubas
- uma
- uraganu
- user
- userftp
- valeria
- very
- viceroy
- victoria
- victory
- video
- viper1
- volvo
- wally
- walter
- webadmin
- welcome
- wesley
- whatever
- whisky
- william
- willie
- wilson
- winner
- winter
- wizard
- wladimir
- wolman
- wolves
- work
- xenia
- xp
- xxx
- xyz123
- yessi
- zandra
- zapata
- zephyr
- ziggy
- zoliba
- zorro
- zxcvbnm
October 11th, 2006 at 3:41 pm
While you have some good tips on securing SSHD, I don’t understand where you connect SHA-1/MD5 precomputation tables with an SSH brute force login attempt.
You may also want to clean up references to “SHA-1 encryption keys” (hash keys are not encryption keys). TMTO attacks have also been known for decades and technically apply to every hash algorithm.
October 11th, 2006 at 5:34 pm
Hi Boris (lol), thanks for your comment, I have connected SHA-1 and MD5 precomputation tables together because there actually exists SHA-1 collision tables that are in circulation; specifically articles refering to “SHA-1 broken by research team of Xiaoyun Wang, Yiqun Lisa Yin, and Hongbo Yu (mostly from Shandong University in China)” allowing for very rapid bruteforcing of SHA-1 (and assuming that someone gains access to your passwd and shadow file) it becomes a significant problem with SSH logins (without requiring any bruteforce login attempts as the password is of precomputated datatype).
Regarding the SHA-1 encryption keys, well, I’m sorry about that, there is no excuse really. The encryption key itself and the hashing key are indeed different.
Thanks,
Best Wishes,
Azio