SlideShare a Scribd company logo
1 of 49
Unix: The Other White Meat
Adam Compton
• Who Am I?
• Simple Answer:
• Father/Husband/Son/Brother
• Programmer/Pentester/Researcher
• Hillbilly
#> whoami
David Boyd
• Pen Tester/Red Teamer
• Christian
• Husband
• Father
• US Army
• Geek, Gamer
#> whoami
• DO:
• Talk about Unix
• Show Common Exploit Vectors
• NOT:
• Teach all of Unix
• Get in to debate of VI vs Emacs vs nano vs ….
#> cat agenda.txt
A Brief History of Unix
• 1945 - ENIAC (1st* Large-Scale General Purpose Computer)
#> history
#> history
• 1945 - ENIAC (1st* Large-Scale General Purpose Computer)
• 1964 - Multics (Multiplexed Information and Computing
Service) developed by GE and Bell Labs
• 1945 - ENIAC (1st* Large-Scale General Purpose Computer)
• 1964 - Multics (Multiplexed Information and Computing
Service) developed by GE and Bell Labs
• 1969 - Ken Thompson & Dennis Ritchie and others start on
what would become Unix
#> history
• 1945 - ENIAC (1st* Large-Scale General Purpose Computer)
• 1964 - Multics (Multiplexed Information and Computing
Service) developed by GE and Bell Labs
• 1969 - Ken Thompson & Dennis Ritchie and others start on
what would become Unix
• 1971 - UNIX was developed for the PDP-11/20 written in
Assembly
#> history
• 1945 - ENIAC (1st* Large-Scale General Purpose Computer)
• 1964 - Multics (Multiplexed Information and Computing
Service) developed by GE and Bell Labs
• 1969 - Ken Thompson & Dennis Ritchie and others start on
what would become Unix
• 1971 - UNIX was developed for the PDP-11/20 written in
Assembly
• 1973 - UNIX was completely rewritten in C
#> history
• 1945 - ENIAC (1st* Large-Scale General Purpose Computer)
• 1964 - Multics (Multiplexed Information and Computing
Service) developed by GE and Bell Labs
• 1969 - Ken Thompson & Dennis Ritchie and others start on
what would become Unix
• 1971 - UNIX was developed for the PDP-11/20 written in
Assembly
• 1973 - UNIX was completely rewritten in C
• 1978 - BSD is Released
#> history
• 1945 - ENIAC (1st* Large-Scale General Purpose Computer)
• 1964 - Multics (Multiplexed Information and Computing
Service) developed by GE and Bell Labs
• 1969 - Ken Thompson & Dennis Ritchie and others start on
what would become Unix
• 1971 - UNIX was developed for the PDP-11/20 written in
Assembly
• 1973 - UNIX was completely rewritten in C
• 1978 - BSD is Released
• 1982 - AT&T’s UNIS System Group releases System III, the first
public release outside Bell Lab
#> history
• 1982 - SunOS 1.0, HP-UX, Ultix-11
#> history
• 1982 - SunOS 1.0, HP-UX, Ultix-11
• 1986 - AIX
#> history
• 1982 - SunOS 1.0, HP-UX, Ultix-11
• 1986 - AIX
• 1987 - IRIX
#> history
• 1982 - SunOS 1.0, HP-UX, Ultix-11
• 1986 - AIX
• 1987 - IRIX
• 1991 - Solaris 1.0, Linus Torvalds starts on
Linux 0.01
#> history
• 1982 - SunOS 1.0, HP-UX, Ultix-11
• 1986 - AIX
• 1987 - IRIX
• 1991 - Solaris 1.0, Linus Torvalds starts on
Linux 0.01
• 1995 - Digital Unix
#> history
• 1982 - SunOS 1.0, HP-UX, Ultix-11
• 1986 - AIX
• 1987 - IRIX
• 1991 - Solaris 1.0, Linus Torvalds starts on
Linux 0.01
• 1995 - Digital Unix
• 1999 - Tru64
#> history
• 1982 - SunOS 1.0, HP-UX, Ultix-11
• 1986 - AIX
• 1987 - IRIX
• 1991 - Solaris 1.0, Linus Torvalds starts on
Linux 0.01
• 1995 - Digital Unix
• 1999 - Tru64
• 2001 - OSX 10 released
#> history
• Passwords
• File Permissions
• Trust Relationships
• Application Flaws (BOF, HOF, etc…)
#> grep issues changelog.txt
• Morris Worm (1988)
• targeted sendmail, finger, rsh/rexec, weak passwords
• Written by: Robert Tappan Morris @ Cornell University
#> apropos "Morris Worm"
/etc/passwd
<username>:<encrypted password>:<UID>:<GID>:<full name>:<home dir>:<shell>
<encrypted password> = crypt(plaintext password)
crypt() used to use DES (with a 12 bit number salt 0-4095)
salt selected based on time of day
converted to 2 character string and prepended to encrypted password
Improvements:
• /etc/shadow
• crypt() -> md5, sha1, sha256
#> cat /etc/passwd
#> ls -la
Interesting files:
• /etc/password
• /var/log
• /var/mail
• .history
• .rhosts
• .forward
• "any ~/.xxxx File"
SETUID/SETGID Files
find / -perm /4000 -print
find / -perm /2000 -print
#> ls -la
R-Commands
• rsh/rlogin/exec
• Important files:
• ~/.rhosts
• /etc/hosts.equiv
NFS
• showmount -e
• /etc/export
SUDO/su
• sudo -l
#> echo "+ +" > ~/.rhosts
DEMO: R - Commands
DEMO: NFS Commands
Services:
• telnetd
• sadmind
• sendmail
Tools:
• Nmap
Web apps:
• phpmyadmin
• tomcat/jboss
• jenkins
#> nmap -A -p- 10.0.0.0/24
DEMO: telnet -l "-fbin" x.x.x.x
Real World Privilege Escalation
#> echo "A Quick Note"
• Who am I? Who else is logged in? Who are superusers?
• What info do I have access to? What can I do?
• Where can I go?
#> cat enum.txt
uname –a – Current kernel version
env – Current environment variable
pwd – Current directory
whoami – Current user
history – Command history for current user
cat ~/.bash_history – Bash history
sudo –l Commands you can run as sudo
cat /etc/sudoers – Who is in sudoers file
cat /etc/passwd – Additional users
#> cat example.txt
LinEnum
• https://github.com/rebootuser/LinEnum
LinuxPrivChecker
• https://github.com/sleventyeleven/linuxprivchecker
UnixPrivescCheck
• https://github.com/pentestmonkey/unix-privesc-check
#> cat EnumerationScripts.txt
DEMO: Enumeration Scripts
Searchsploit is a command line search tool for Exploit-DB that also allows you to
take a copy of Exploit Database with you, everywhere you go.
SearchSploit gives you the power to perform detailed off-line searches through
your locally checked-out copy of the repository.
#> searchsploit -h
SUID (Set owner User ID up on execution) is a special type of file permissions
given to a file. Normally in Linux/Unix when a program runs, it inherits access
permissions from the logged in user. SUID is defined as giving temporary
permissions to a user to run a program/file with the permissions of the file owner
rather that the user who runs it.
In simple words, users will get file owners permissions as well as owner UID
and GID when executing a file/program/command.
#> find / -perm /4000 -ls
DEMO: SETUID
• Mempodipper
• DirtyCow
• sendpage
• Dirty_Sock
#> ls /boot/vmlinuz*
#> apropos DirtyCow
#> apt-get update
DEMO: DirtyCow
• https://initblog.com/2019/dirty-sock/
• A privilege escalation vulnerability in default installations of Ubuntu Linux. This
was due to a bug in the ‘snapd’ API, a default service. Any local user could
exploit this vulnerability to obtain immediate root access to the system.
• Affects snapd versions < 2.37.1
#> apropos DirtySock
DEMO: DirtySock
Final Thoughts
Basic Linux Privilege Escalation – G0tmi1k
• https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/
BSides Augusta – Jake Williams
• https://www.youtube.com/watch?v=dk2wsyFiosg
Tradecraft Security Weekly
• https://www.youtube.com/watch?v=oYHAi0cgur4
#> cat Additional_Resources.txt
HackTheBox
• https://www.hackthebox.eu/
VulnHub
• https://www.vulnhub.com/
Metasploitable
• https://information.rapid7.com/download-metasploitable-2017.html
#> echo "Try Harder"
Contact Us!
Adam L. Compton
@tatanus
www.hillbillystorytime.com
www.youtube.com/hillbillstorytime
adam.comptom@gmail.com
adam.compton@trustedsec.com
David R. Boyd
@fir3d0g
www.twitch.tv/fir3d0g
fir3d0g
techboyd@gmail.com
david.boyd@trustedsec.com

More Related Content

What's hot

Gentoo on a 486
Gentoo on a 486Gentoo on a 486
Gentoo on a 486yeokm1
 
Introduction to Linux for bioinformatics
Introduction to Linux for bioinformaticsIntroduction to Linux for bioinformatics
Introduction to Linux for bioinformaticsBITS
 
Anton Chuvakin on illogic Rootkit Analysis
Anton Chuvakin on illogic Rootkit AnalysisAnton Chuvakin on illogic Rootkit Analysis
Anton Chuvakin on illogic Rootkit AnalysisAnton Chuvakin
 
Group project linux helix
Group project linux helixGroup project linux helix
Group project linux helixJeff Carroll
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating SystemShivam Pandey
 
Operating systems unix
Operating systems   unixOperating systems   unix
Operating systems unixAchu dhan
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training Nancy Thomas
 
Unix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksUnix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksLOKESH KUMAR
 
Linux introduction
Linux introduction Linux introduction
Linux introduction Bushra Abro
 
Linux & Unix Operating System's
Linux & Unix Operating System'sLinux & Unix Operating System's
Linux & Unix Operating System'sRiaz Ahmed Channa
 
Linux operating system - Overview
Linux operating system - OverviewLinux operating system - Overview
Linux operating system - OverviewAshita Agrawal
 
Installing Notes 9 on Ubuntu 12.10
Installing Notes 9 on Ubuntu 12.10Installing Notes 9 on Ubuntu 12.10
Installing Notes 9 on Ubuntu 12.10Matthias Knäpper
 
Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)Sian Lerk Lau
 
Exploiting Llinux Environment
Exploiting Llinux EnvironmentExploiting Llinux Environment
Exploiting Llinux EnvironmentEnrico Scapin
 

What's hot (20)

Gentoo on a 486
Gentoo on a 486Gentoo on a 486
Gentoo on a 486
 
Introduction to Linux for bioinformatics
Introduction to Linux for bioinformaticsIntroduction to Linux for bioinformatics
Introduction to Linux for bioinformatics
 
Unix ppt
Unix pptUnix ppt
Unix ppt
 
Anton Chuvakin on illogic Rootkit Analysis
Anton Chuvakin on illogic Rootkit AnalysisAnton Chuvakin on illogic Rootkit Analysis
Anton Chuvakin on illogic Rootkit Analysis
 
Group project linux helix
Group project linux helixGroup project linux helix
Group project linux helix
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 
Operating systems unix
Operating systems   unixOperating systems   unix
Operating systems unix
 
os linux
os linuxos linux
os linux
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training
 
Unix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | BlocksUnix and shell programming | Unix File System | Unix File Permission | Blocks
Unix and shell programming | Unix File System | Unix File Permission | Blocks
 
Linux introduction
Linux introduction Linux introduction
Linux introduction
 
Linux & Unix Operating System's
Linux & Unix Operating System'sLinux & Unix Operating System's
Linux & Unix Operating System's
 
Arch linux
Arch linuxArch linux
Arch linux
 
Basic unix commands1
Basic unix commands1Basic unix commands1
Basic unix commands1
 
Linux operating system - Overview
Linux operating system - OverviewLinux operating system - Overview
Linux operating system - Overview
 
Installing Notes 9 on Ubuntu 12.10
Installing Notes 9 on Ubuntu 12.10Installing Notes 9 on Ubuntu 12.10
Installing Notes 9 on Ubuntu 12.10
 
Unix environment
Unix environmentUnix environment
Unix environment
 
Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)
 
Exploiting Llinux Environment
Exploiting Llinux EnvironmentExploiting Llinux Environment
Exploiting Llinux Environment
 

Similar to Unix Exploits

3. operating systems history
3. operating systems history3. operating systems history
3. operating systems historyMarian Marinov
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadRavikumar Nandigam
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Ahmed El-Arabawy
 
Embedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUEmbedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUAhmed El-Arabawy
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_bMohammad Reza Beygi
 
PLNOG 21: Ron Broersma - Historical_Perspectives_on_Computing, Networking, Se...
PLNOG 21: Ron Broersma - Historical_Perspectives_on_Computing, Networking, Se...PLNOG 21: Ron Broersma - Historical_Perspectives_on_Computing, Networking, Se...
PLNOG 21: Ron Broersma - Historical_Perspectives_on_Computing, Networking, Se...PROIDEA
 
Linux command ppt
Linux command pptLinux command ppt
Linux command pptkalyanineve
 
Unix lecture1
Unix lecture1Unix lecture1
Unix lecture1dolleyj
 
Linux Knowledge Transfer
Linux Knowledge TransferLinux Knowledge Transfer
Linux Knowledge TransferTapio Vaattanen
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxMedhat Dawoud
 
نوم نوراغا
نوم    نوراغانوم    نوراغا
نوم نوراغاZia Hotak
 
00000001_Embedded_Linux_RevisionFile.pdf
00000001_Embedded_Linux_RevisionFile.pdf00000001_Embedded_Linux_RevisionFile.pdf
00000001_Embedded_Linux_RevisionFile.pdfDiana Atef
 
UNIX and Linux - an introduction by Mathias Homann
UNIX and Linux - an introduction by Mathias HomannUNIX and Linux - an introduction by Mathias Homann
UNIX and Linux - an introduction by Mathias HomannMathias Homann
 
Linux Operating System. UOG MARGHAZAR Campus
 Linux Operating System. UOG MARGHAZAR Campus Linux Operating System. UOG MARGHAZAR Campus
Linux Operating System. UOG MARGHAZAR CampusSYEDASADALI38
 
How I Learned to Stop Worrying and Love the Linux
How I Learned to Stop Worrying and Love the LinuxHow I Learned to Stop Worrying and Love the Linux
How I Learned to Stop Worrying and Love the LinuxHelen Tabunshchyk
 

Similar to Unix Exploits (20)

3. operating systems history
3. operating systems history3. operating systems history
3. operating systems history
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in Hyderabad
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU
 
Embedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUEmbedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNU
 
Opensource technologies
Opensource technologiesOpensource technologies
Opensource technologies
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
 
PLNOG 21: Ron Broersma - Historical_Perspectives_on_Computing, Networking, Se...
PLNOG 21: Ron Broersma - Historical_Perspectives_on_Computing, Networking, Se...PLNOG 21: Ron Broersma - Historical_Perspectives_on_Computing, Networking, Se...
PLNOG 21: Ron Broersma - Historical_Perspectives_on_Computing, Networking, Se...
 
Sistemas Operativos
Sistemas OperativosSistemas Operativos
Sistemas Operativos
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
 
Unix lecture1
Unix lecture1Unix lecture1
Unix lecture1
 
Linux Knowledge Transfer
Linux Knowledge TransferLinux Knowledge Transfer
Linux Knowledge Transfer
 
Linux
LinuxLinux
Linux
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
نوم نوراغا
نوم    نوراغانوم    نوراغا
نوم نوراغا
 
00000001_Embedded_Linux_RevisionFile.pdf
00000001_Embedded_Linux_RevisionFile.pdf00000001_Embedded_Linux_RevisionFile.pdf
00000001_Embedded_Linux_RevisionFile.pdf
 
UNIX and Linux - an introduction by Mathias Homann
UNIX and Linux - an introduction by Mathias HomannUNIX and Linux - an introduction by Mathias Homann
UNIX and Linux - an introduction by Mathias Homann
 
Linux Operating System. UOG MARGHAZAR Campus
 Linux Operating System. UOG MARGHAZAR Campus Linux Operating System. UOG MARGHAZAR Campus
Linux Operating System. UOG MARGHAZAR Campus
 
Linux technology
Linux technologyLinux technology
Linux technology
 
How I Learned to Stop Worrying and Love the Linux
How I Learned to Stop Worrying and Love the LinuxHow I Learned to Stop Worrying and Love the Linux
How I Learned to Stop Worrying and Love the Linux
 
History of linux
History of linuxHistory of linux
History of linux
 

More from Adam Compton

Becoming a Pentester
Becoming a PentesterBecoming a Pentester
Becoming a PentesterAdam Compton
 
A HillyBilly's Guide to Staying Anonymous Online - SecureWV
A HillyBilly's Guide to Staying Anonymous Online - SecureWVA HillyBilly's Guide to Staying Anonymous Online - SecureWV
A HillyBilly's Guide to Staying Anonymous Online - SecureWVAdam Compton
 
2018 DerbyCon - Hillbilly Storytime - Pentest Fails
2018 DerbyCon - Hillbilly Storytime - Pentest Fails2018 DerbyCon - Hillbilly Storytime - Pentest Fails
2018 DerbyCon - Hillbilly Storytime - Pentest FailsAdam Compton
 
2018 HackerHalted - Hillbilly Storytime - Pentest Fails
2018 HackerHalted - Hillbilly Storytime - Pentest Fails2018 HackerHalted - Hillbilly Storytime - Pentest Fails
2018 HackerHalted - Hillbilly Storytime - Pentest FailsAdam Compton
 
Bsides LV - Hillbilly Storytime - Pentest Fails
Bsides LV - Hillbilly Storytime - Pentest FailsBsides LV - Hillbilly Storytime - Pentest Fails
Bsides LV - Hillbilly Storytime - Pentest FailsAdam Compton
 
SecureWV - PentestFails
SecureWV - PentestFailsSecureWV - PentestFails
SecureWV - PentestFailsAdam Compton
 
Infosec Europe 17 - PentestFails
Infosec Europe 17 - PentestFailsInfosec Europe 17 - PentestFails
Infosec Europe 17 - PentestFailsAdam Compton
 
Bsides Nashville - PentestFails
Bsides Nashville - PentestFailsBsides Nashville - PentestFails
Bsides Nashville - PentestFailsAdam Compton
 
Bsides Knoxville - OSINT
Bsides Knoxville - OSINTBsides Knoxville - OSINT
Bsides Knoxville - OSINTAdam Compton
 
Bsides Knoxville - PentestFails
Bsides Knoxville - PentestFailsBsides Knoxville - PentestFails
Bsides Knoxville - PentestFailsAdam Compton
 
Bsides Knoxville - APT2
Bsides Knoxville - APT2Bsides Knoxville - APT2
Bsides Knoxville - APT2Adam Compton
 

More from Adam Compton (15)

Becoming a Pentester
Becoming a PentesterBecoming a Pentester
Becoming a Pentester
 
A HillyBilly's Guide to Staying Anonymous Online - SecureWV
A HillyBilly's Guide to Staying Anonymous Online - SecureWVA HillyBilly's Guide to Staying Anonymous Online - SecureWV
A HillyBilly's Guide to Staying Anonymous Online - SecureWV
 
2018 DerbyCon - Hillbilly Storytime - Pentest Fails
2018 DerbyCon - Hillbilly Storytime - Pentest Fails2018 DerbyCon - Hillbilly Storytime - Pentest Fails
2018 DerbyCon - Hillbilly Storytime - Pentest Fails
 
2018 HackerHalted - Hillbilly Storytime - Pentest Fails
2018 HackerHalted - Hillbilly Storytime - Pentest Fails2018 HackerHalted - Hillbilly Storytime - Pentest Fails
2018 HackerHalted - Hillbilly Storytime - Pentest Fails
 
Bsides LV - Hillbilly Storytime - Pentest Fails
Bsides LV - Hillbilly Storytime - Pentest FailsBsides LV - Hillbilly Storytime - Pentest Fails
Bsides LV - Hillbilly Storytime - Pentest Fails
 
SecureWV - PentestFails
SecureWV - PentestFailsSecureWV - PentestFails
SecureWV - PentestFails
 
SecureWV - APT2
SecureWV - APT2SecureWV - APT2
SecureWV - APT2
 
Infosec Europe 17 - PentestFails
Infosec Europe 17 - PentestFailsInfosec Europe 17 - PentestFails
Infosec Europe 17 - PentestFails
 
HackCon - SPF
HackCon - SPFHackCon - SPF
HackCon - SPF
 
DerbyCon - Legion
DerbyCon - LegionDerbyCon - Legion
DerbyCon - Legion
 
DerbyCon - APT2
DerbyCon - APT2DerbyCon - APT2
DerbyCon - APT2
 
Bsides Nashville - PentestFails
Bsides Nashville - PentestFailsBsides Nashville - PentestFails
Bsides Nashville - PentestFails
 
Bsides Knoxville - OSINT
Bsides Knoxville - OSINTBsides Knoxville - OSINT
Bsides Knoxville - OSINT
 
Bsides Knoxville - PentestFails
Bsides Knoxville - PentestFailsBsides Knoxville - PentestFails
Bsides Knoxville - PentestFails
 
Bsides Knoxville - APT2
Bsides Knoxville - APT2Bsides Knoxville - APT2
Bsides Knoxville - APT2
 

Recently uploaded

Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneRussian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneCall girls in Ahmedabad High profile
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 

Recently uploaded (20)

Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneRussian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 

Unix Exploits

  • 1. Unix: The Other White Meat
  • 2. Adam Compton • Who Am I? • Simple Answer: • Father/Husband/Son/Brother • Programmer/Pentester/Researcher • Hillbilly #> whoami
  • 3. David Boyd • Pen Tester/Red Teamer • Christian • Husband • Father • US Army • Geek, Gamer #> whoami
  • 4. • DO: • Talk about Unix • Show Common Exploit Vectors • NOT: • Teach all of Unix • Get in to debate of VI vs Emacs vs nano vs …. #> cat agenda.txt
  • 5. A Brief History of Unix
  • 6. • 1945 - ENIAC (1st* Large-Scale General Purpose Computer) #> history
  • 7. #> history • 1945 - ENIAC (1st* Large-Scale General Purpose Computer) • 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs
  • 8. • 1945 - ENIAC (1st* Large-Scale General Purpose Computer) • 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs • 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix #> history
  • 9. • 1945 - ENIAC (1st* Large-Scale General Purpose Computer) • 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs • 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix • 1971 - UNIX was developed for the PDP-11/20 written in Assembly #> history
  • 10. • 1945 - ENIAC (1st* Large-Scale General Purpose Computer) • 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs • 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix • 1971 - UNIX was developed for the PDP-11/20 written in Assembly • 1973 - UNIX was completely rewritten in C #> history
  • 11. • 1945 - ENIAC (1st* Large-Scale General Purpose Computer) • 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs • 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix • 1971 - UNIX was developed for the PDP-11/20 written in Assembly • 1973 - UNIX was completely rewritten in C • 1978 - BSD is Released #> history
  • 12. • 1945 - ENIAC (1st* Large-Scale General Purpose Computer) • 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs • 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix • 1971 - UNIX was developed for the PDP-11/20 written in Assembly • 1973 - UNIX was completely rewritten in C • 1978 - BSD is Released • 1982 - AT&T’s UNIS System Group releases System III, the first public release outside Bell Lab #> history
  • 13. • 1982 - SunOS 1.0, HP-UX, Ultix-11 #> history
  • 14. • 1982 - SunOS 1.0, HP-UX, Ultix-11 • 1986 - AIX #> history
  • 15. • 1982 - SunOS 1.0, HP-UX, Ultix-11 • 1986 - AIX • 1987 - IRIX #> history
  • 16. • 1982 - SunOS 1.0, HP-UX, Ultix-11 • 1986 - AIX • 1987 - IRIX • 1991 - Solaris 1.0, Linus Torvalds starts on Linux 0.01 #> history
  • 17. • 1982 - SunOS 1.0, HP-UX, Ultix-11 • 1986 - AIX • 1987 - IRIX • 1991 - Solaris 1.0, Linus Torvalds starts on Linux 0.01 • 1995 - Digital Unix #> history
  • 18. • 1982 - SunOS 1.0, HP-UX, Ultix-11 • 1986 - AIX • 1987 - IRIX • 1991 - Solaris 1.0, Linus Torvalds starts on Linux 0.01 • 1995 - Digital Unix • 1999 - Tru64 #> history
  • 19. • 1982 - SunOS 1.0, HP-UX, Ultix-11 • 1986 - AIX • 1987 - IRIX • 1991 - Solaris 1.0, Linus Torvalds starts on Linux 0.01 • 1995 - Digital Unix • 1999 - Tru64 • 2001 - OSX 10 released #> history
  • 20.
  • 21. • Passwords • File Permissions • Trust Relationships • Application Flaws (BOF, HOF, etc…) #> grep issues changelog.txt
  • 22. • Morris Worm (1988) • targeted sendmail, finger, rsh/rexec, weak passwords • Written by: Robert Tappan Morris @ Cornell University #> apropos "Morris Worm"
  • 23. /etc/passwd <username>:<encrypted password>:<UID>:<GID>:<full name>:<home dir>:<shell> <encrypted password> = crypt(plaintext password) crypt() used to use DES (with a 12 bit number salt 0-4095) salt selected based on time of day converted to 2 character string and prepended to encrypted password Improvements: • /etc/shadow • crypt() -> md5, sha1, sha256 #> cat /etc/passwd
  • 25. Interesting files: • /etc/password • /var/log • /var/mail • .history • .rhosts • .forward • "any ~/.xxxx File" SETUID/SETGID Files find / -perm /4000 -print find / -perm /2000 -print #> ls -la
  • 26. R-Commands • rsh/rlogin/exec • Important files: • ~/.rhosts • /etc/hosts.equiv NFS • showmount -e • /etc/export SUDO/su • sudo -l #> echo "+ +" > ~/.rhosts
  • 27. DEMO: R - Commands
  • 29. Services: • telnetd • sadmind • sendmail Tools: • Nmap Web apps: • phpmyadmin • tomcat/jboss • jenkins #> nmap -A -p- 10.0.0.0/24
  • 30. DEMO: telnet -l "-fbin" x.x.x.x
  • 31. Real World Privilege Escalation
  • 32. #> echo "A Quick Note"
  • 33. • Who am I? Who else is logged in? Who are superusers? • What info do I have access to? What can I do? • Where can I go? #> cat enum.txt
  • 34. uname –a – Current kernel version env – Current environment variable pwd – Current directory whoami – Current user history – Command history for current user cat ~/.bash_history – Bash history sudo –l Commands you can run as sudo cat /etc/sudoers – Who is in sudoers file cat /etc/passwd – Additional users #> cat example.txt
  • 37. Searchsploit is a command line search tool for Exploit-DB that also allows you to take a copy of Exploit Database with you, everywhere you go. SearchSploit gives you the power to perform detailed off-line searches through your locally checked-out copy of the repository. #> searchsploit -h
  • 38. SUID (Set owner User ID up on execution) is a special type of file permissions given to a file. Normally in Linux/Unix when a program runs, it inherits access permissions from the logged in user. SUID is defined as giving temporary permissions to a user to run a program/file with the permissions of the file owner rather that the user who runs it. In simple words, users will get file owners permissions as well as owner UID and GID when executing a file/program/command. #> find / -perm /4000 -ls
  • 40. • Mempodipper • DirtyCow • sendpage • Dirty_Sock #> ls /boot/vmlinuz*
  • 44. • https://initblog.com/2019/dirty-sock/ • A privilege escalation vulnerability in default installations of Ubuntu Linux. This was due to a bug in the ‘snapd’ API, a default service. Any local user could exploit this vulnerability to obtain immediate root access to the system. • Affects snapd versions < 2.37.1 #> apropos DirtySock
  • 47. Basic Linux Privilege Escalation – G0tmi1k • https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/ BSides Augusta – Jake Williams • https://www.youtube.com/watch?v=dk2wsyFiosg Tradecraft Security Weekly • https://www.youtube.com/watch?v=oYHAi0cgur4 #> cat Additional_Resources.txt
  • 48. HackTheBox • https://www.hackthebox.eu/ VulnHub • https://www.vulnhub.com/ Metasploitable • https://information.rapid7.com/download-metasploitable-2017.html #> echo "Try Harder"
  • 49. Contact Us! Adam L. Compton @tatanus www.hillbillystorytime.com www.youtube.com/hillbillstorytime adam.comptom@gmail.com adam.compton@trustedsec.com David R. Boyd @fir3d0g www.twitch.tv/fir3d0g fir3d0g techboyd@gmail.com david.boyd@trustedsec.com

Editor's Notes

  1. Welcome to our talk. Hopefully you are here for “Unix: The Other White Meat”…. If not, um…. Just stay anyway please? So, lets get started…
  2. 1945 - ENIAC (1st* Large-Scale General Purpose Computer) 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix 1971 - UNIX was developed for the PDP-11/20 written in Assembly Interesting Note: The original name was proposed to be “Unics (Uniplexed Information and Computing Service)“ 1973 - UNIX was completely rewritten in C 1978 - BSD is Released 1982 - AT&T’s UNIS System Group releases System III, the first public release outside Bell Lab SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced
  3. 1945 - ENIAC (1st* Large-Scale General Purpose Computer) 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix 1971 - UNIX was developed for the PDP-11/20 written in Assembly Interesting Note: The original name was proposed to be “Unics (Uniplexed Information and Computing Service)“ 1973 - UNIX was completely rewritten in C 1978 - BSD is Released 1982 - AT&T’s UNIS System Group releases System III, the first public release outside Bell Lab SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced
  4. 1945 - ENIAC (1st* Large-Scale General Purpose Computer) 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix 1971 - UNIX was developed for the PDP-11/20 written in Assembly Interesting Note: The original name was proposed to be “Unics (Uniplexed Information and Computing Service)“ 1973 - UNIX was completely rewritten in C 1978 - BSD is Released 1982 - AT&T’s UNIS System Group releases System III, the first public release outside Bell Lab SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced
  5. 1945 - ENIAC (1st* Large-Scale General Purpose Computer) 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix 1971 - UNIX was developed for the PDP-11/20 written in Assembly Interesting Note: The original name was proposed to be “Unics (Uniplexed Information and Computing Service)“ 1973 - UNIX was completely rewritten in C 1978 - BSD is Released 1982 - AT&T’s UNIS System Group releases System III, the first public release outside Bell Lab SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced
  6. 1945 - ENIAC (1st* Large-Scale General Purpose Computer) 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix 1971 - UNIX was developed for the PDP-11/20 written in Assembly Interesting Note: The original name was proposed to be “Unics (Uniplexed Information and Computing Service)“ 1973 - UNIX was completely rewritten in C 1978 - BSD is Released 1982 - AT&T’s UNIS System Group releases System III, the first public release outside Bell Lab SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced
  7. 1945 - ENIAC (1st* Large-Scale General Purpose Computer) 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix 1971 - UNIX was developed for the PDP-11/20 written in Assembly Interesting Note: The original name was proposed to be “Unics (Uniplexed Information and Computing Service)“ 1973 - UNIX was completely rewritten in C 1978 - BSD is Released 1982 - AT&T’s UNIS System Group releases System III, the first public release outside Bell Lab SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced
  8. 1945 - ENIAC (1st* Large-Scale General Purpose Computer) 1964 - Multics (Multiplexed Information and Computing Service) developed by GE and Bell Labs 1969 - Ken Thompson & Dennis Ritchie and others start on what would become Unix 1971 - UNIX was developed for the PDP-11/20 written in Assembly Interesting Note: The original name was proposed to be “Unics (Uniplexed Information and Computing Service)“ 1973 - UNIX was completely rewritten in C 1978 - BSD is Released 1982 - AT&T’s UNIS System Group releases System III, the first public release outside Bell Lab SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced
  9. 1982 - SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced 1986 - AIX 1987 - IRIX 1991 - Solaris 1.0 ships and Linus Torvalds starts on Linux 0.01 1995 - Digital Unix 1999 - Tru64 2001` - OSX 10 released
  10. 1982 - SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced 1986 - AIX 1987 - IRIX 1991 - Solaris 1.0 ships and Linus Torvalds starts on Linux 0.01 1995 - Digital Unix 1999 - Tru64 2001` - OSX 10 released
  11. 1982 - SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced 1986 - AIX 1987 - IRIX 1991 - Solaris 1.0 ships and Linus Torvalds starts on Linux 0.01 1995 - Digital Unix 1999 - Tru64 2001` - OSX 10 released
  12. 1982 - SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced 1986 - AIX 1987 - IRIX 1991 - Solaris 1.0 ships and Linus Torvalds starts on Linux 0.01 1995 - Digital Unix 1999 - Tru64 2001` - OSX 10 released
  13. 1982 - SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced 1986 - AIX 1987 - IRIX 1991 - Solaris 1.0 ships and Linus Torvalds starts on Linux 0.01 1995 - Digital Unix 1999 - Tru64 2001` - OSX 10 released
  14. 1982 - SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced 1986 - AIX 1987 - IRIX 1991 - Solaris 1.0 ships and Linus Torvalds starts on Linux 0.01 1995 - Digital Unix 1999 - Tru64 2001` - OSX 10 released
  15. 1982 - SUNOS 1.0 shipped, HP-US is introduced and Ultix-11 is introduced 1986 - AIX 1987 - IRIX 1991 - Solaris 1.0 ships and Linus Torvalds starts on Linux 0.01 1995 - Digital Unix 1999 - Tru64 2001` - OSX 10 released
  16. Show Family Tree
  17. Historical issues and VulnerabilitiesKeep in mind that UNIX like so many other early Operating Systems were not designed with security in mind. They were intended to be open-ish. Sure they eventually implemented passwords and file permissions, but they were not taken overly seriously until sometime around 2000.
  18. Nov 2, 1988 Launched from a computer at MIT It would infect systems 1 out 7 times. The worm obtains host addresses by examining the system tables /etc/hosts.equiv and /.rhosts, user files like .forward and. rhosts, dynamic routing information produced by the netstat program, and finally randomly generated host addresses on local networks. Penetration of a remote system can be accomplished in any of three ways. The worm can take advantage of a bug in the finger server that allows it to download code in place of a finger request and trick the server into executing it. The worm can use a "trap door" in the sendmail SMTP mail service, exercising a bug in the debugging code that allows it to execute a command interpreter and download code across a mail connection. If the worm can penetrate a local account by guessing its password, it can use the rexec and rsh remote command interpreter services to attack hosts that share that account. It would randomly “FORK” to avoind being on any given PID too long.. It would change its execution arg list to be just “sh” If remote connection start to fail, then it deletes itself EXPLOITS: rsh/rexec RCE in fingerd DEBUG feature in sendmail allowed for RCE Weak passwords
  19. Owner – group – other R W X SETUID chmod g+s <file> SETGID chmod u+s <file> STICKY chmod o+t <file> only the file's owner, the directory's owner, or root user can rename or delete the file
  20. The .rhosts file is used with the r- commands (rlogin, rsh, etc.) and it allows anyone to log in to the system without a password as long as they report having certain usernames or hostnames. The file /etc/hosts.equiv contains at least one entry that allows unauthenticated remote access from certain systems based only on the IP address or hostname
  21. The .rhosts file is used with the r- commands (rlogin, rsh, etc.) and it allows anyone to log in to the system without a password as long as they report having certain usernames or hostnames. The file /etc/hosts.equiv contains at least one entry that allows unauthenticated remote access from certain systems based only on the IP address or hostname Rexec 512/tcp rlogin 513/tcp Rsh 514/tcp .rhosts <ip> <user> + + /etc/hostes.equiv <ip> <user> + + Rpcinfo –p <ip> Rusers –l <ip>
  22. Rpcinfo Rsysinfo Rusers Rsh
  23. Showmount Nfs No-root-squash
  24. So I need some audience participation here. During these demos youll hear me say, so we got a shell. As pentesters, we love doing a shell dance. So when you hear that, I need yall to holler turtle power!
  25. We recently discovered cleartext passwords in bash history on a gig
  26. LinEnum.sh - Scripted Local Linux Enumeration & Privilege Escalation Checks LinuxPrivChecker - This script is intended to be executed locally on a Linux box to enumerate basic system info and search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text passwords and applicable exploits UnixPrivescCheck – From PentestMonkey, Shell script to check for simple privilege escalation vectors on Unix systems
  27. What is SetUid
  28. So here we find files with the SETUID flag enabled
  29. Kernel exploits
  30. "A race condition was found in the way the Linux kernel's memory subsystem handled the copy-on-write (COW) breakage of private read-only memory mappings. An unprivileged local user could use this flaw to gain write access to otherwise read-only memory mappings and thus increase their privileges on the system." (RH)
  31. https://github.com/dirtycow/dirtycow.github.io/wiki/Patched-Kernel-Versions