50 ton of backdoors

19
50 ton of backdoors Ulisses Castro - Co0L BSidesSP v10 Novembro/2014

Upload: ulisses-castro

Post on 03-Jul-2015

560 views

Category:

Technology


0 download

DESCRIPTION

Through practical demonstrations, techniques to deploy backdoors on Linux systems only with native tools and software, teaching through offensive techniques to defend and detect potential threats on servers and desktops. This presentation puts in a state of alert users, system administrators and security analysts about the dangers of leaving even for a few minutes systems without supervision.

TRANSCRIPT

Page 1: 50 ton of Backdoors

50 ton of backdoorsUlisses Castro - Co0L BSidesSP v10 Novembro/2014

Page 2: 50 ton of Backdoors

Ulisses Castrohttps://twitter.com/usscastrohttp://ulissescastro.comhttps://www.youtube.com/user/usscastro

● Black magic security specialist● Subversive thinker as “lifestyle”● Hardening systems/apps as “jobstyle”● Problem solver and pentester addictive● +10 years pro experience● Bla, bla, bla…

about me

http://br.linkedin.com/in/ulissescastro/

Page 3: 50 ton of Backdoors

A ton is a unit of mass, volume, energy or power.http://en.wikipedia.org/wiki/Ton_(disambiguation)

Page 4: 50 ton of Backdoors

motivation

Pranks?

Intrusion detection?

Hardening?

(Un)ethical hacking?

Exploitation?

Reputation?

Incident response?

Because we can?MOTIVATION

Some people need more than others...

http://www.passionsmiths.com/admin/images/motivation.jpg

Page 5: 50 ton of Backdoors

disclaimer

PLEASE, don’t blame me!

YES, next proof of concepts will be with ROOT user.

BUT, stick to the point and remember motivations!

Upcoming slides will show you how dangerous “native” Linux tools are and how we can own someone in a blink of

an eye!

Page 6: 50 ton of Backdoors

DEMO GIT HOOKShttps://www.youtube.com/watch?v=rCVmWUf8x1E

“...Like many other Version Control Systems, Git has a way to fire off custom scripts when certain important actions occur. There are two groups of these hooks: client-side and server-side. Client-side hooks are triggered by operations such as committing and merging, while server-side hooks run on network operations such as receiving pushed commits. You can use these hooks for all

sorts of reasons…”

http://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

Page 7: 50 ton of Backdoors

DEMO PROMPT_COMMANDhttps://www.youtube.com/watch?v=lM10kYBoKtg

“...If set, the value is executed as a command prior to issuing each primary prompt.…”

Page 8: 50 ton of Backdoors

DEMO SUDOERShttps://www.youtube.com/watch?v=tkwEn7q0Cc0

“...It is possible to include other sudoers files from within the sudoers file currently being parsed using the #include and #includedir directives..…”

Pound sign (#) as include character? Really?

Page 9: 50 ton of Backdoors

DEMO TCP WRAPPERShttps://www.youtube.com/watch?v=mOOZwodcm40

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Reference_Guide/s1-tcpwrappers-access.htmlhttp://www.exploit-db.com/exploits/35234/ - CVE 2014-5284

“...If the first-matched access control rule contains a shell command, that command is subjected to %<letter> substitutions (expansions). The result is executed by a /bin/sh child process with

standard input, output and error connected to /dev/null. Specify an `&´ at the end of the command if you do not want to wait until it has completed…”

Page 10: 50 ton of Backdoors

DEMO NMAPhttps://www.youtube.com/watch?v=bPaCfKc4Ow4

"...File and directory names may be relative or absolute. Absolute names are used directly. Relative paths are looked for in the scripts of each of the following places until found: --datadir $NMAPDIR. ~/.nmap (not searched on Windows). HOME\AppData\Roaming\nmap (only on Windows). the directory containing the nmap executable the directory containing the nmap executable, followed by ../share/nmap NMAPDATADIR. the current directory..."

Page 11: 50 ton of Backdoors

DEMO SSHhttps://www.youtube.com/watch?v=byoCWf8SEZc

ProxyCommand, Specifies the command to use to connect to the server...

Page 12: 50 ton of Backdoors

DEMO UNICODE HOMOGLYPHShttps://www.youtube.com/watch?v=Os0QKZgvE_I

"...The Unicode character set contains many strongly homoglyphic characters. These present security risks in a variety of situations..." (Wikipedia)

Page 13: 50 ton of Backdoors

DEMO NETWORK-MANAGERhttps://www.youtube.com/watch?v=I6kRJbxzcV4

"...List available WiFi access points. iface and bssid options can be used to get just APs for particular interface or specific AP, respectively...."

Page 14: 50 ton of Backdoors

deploy alternatives

Page 15: 50 ton of Backdoors

“teensyduino”

https://www.pjrc.com/teensy/https://www.pjrc.com/teensy/td_keyboard.html

Act like a HID!“The Teensy is a complete USB-based microcontroller development system, in a very small footprint (...)”

Page 16: 50 ton of Backdoors

DEMO TEENSY

Page 17: 50 ton of Backdoors

github project

Linux Native Backdoorshttps://github.com/ulissescastro/linux-native-backdoors

Check out …

Backdoor demosNative Linux backdoors cmdsThis presentationCode snipets

Fork it! ;-)

http://2.bp.blogspot.com/-7QZ3mxD2Z3E/T484QFGOw8I/AAAAAAAABDY/8nf1Xso4UnQ/s1600/hiddendoorway.jpg

Page 18: 50 ton of Backdoors

questions?

QUESTIONS?

http://blog.tendtudo.com.br/wp-content/uploads/2013/12/033.jpg

Page 19: 50 ton of Backdoors

THANKS!@usscastro // uss.thebug [a] gmail.com