sergey gordeychik - how to hack a telecom and stay alive

71
How to Hack a Telecommunication Company And Stay Alive Sergey Gordeychik Positive Technologies CTO

Upload: defconrussia

Post on 22-Jun-2015

1.079 views

Category:

Technology


2 download

DESCRIPTION

International Security Conference "ZeroNights 2011" - http://www.zeronights.org/

TRANSCRIPT

Page 1: Sergey Gordeychik - How to hack a telecom and stay alive

How to Hack a Telecommunication Company

And Stay Alive

Sergey Gordeychik

Positive Technologies

CTO

Page 2: Sergey Gordeychik - How to hack a telecom and stay alive

Ic Beo

Sergey Gordeychik, Positive Technologies, CTO

A “script writer” and a “director” of the Positive Hack Days forum

Science editor of the SecurityLab.Ru portal

Author of the Web Application Security course, and a book titled A Wireless Network Security and a namesake course

A participant of WASC, RISSPA

http://sgordey.blogspot.com

Page 3: Sergey Gordeychik - How to hack a telecom and stay alive

What Is It All About?

What is so peculiar about telecoms?

Attacks against subscribers/Attacks by subscribers

Perimeter… Just a perimeter

Partners and contractors

Technology networks

Page 4: Sergey Gordeychik - How to hack a telecom and stay alive

What’s So Peculiar?

Page 5: Sergey Gordeychik - How to hack a telecom and stay alive

Specific Features of Telecommunication Companies

Large, large networks

Unification of various services (broadband access, Wi-Fi, hosting, mobile communication)

Great number of applications and systems on the perimeter

Exotics inside and outside

Lots of perimeters

Most networks belong to third parties

Forensics nightmare

Page 6: Sergey Gordeychik - How to hack a telecom and stay alive

Subscribers

Partners

How many perimeters do telecoms have?

Office

Technology

network

Internet

Page 7: Sergey Gordeychik - How to hack a telecom and stay alive

…and a bit more…

Mobile

communications

Wired broadband access

Wireless broadband access

VOIP

Hosting

...

Broadband

access

Technological

network

Internet TV

Hosting

Page 8: Sergey Gordeychik - How to hack a telecom and stay alive

…and a bit more…

Vladivostok

Moscow

Roma

Phnom Penh

Page 9: Sergey Gordeychik - How to hack a telecom and stay alive

Attack AGAINST Subscribers

Page 10: Sergey Gordeychik - How to hack a telecom and stay alive

Why Subscribers?

Subscribers’ $ = telecoms’ $

DOS = - $$ - reputation - $$

PWN (100 000 PC) = Botnet

Personal data!

Page 11: Sergey Gordeychik - How to hack a telecom and stay alive

Broadband Access

Huge non-segmented networks

Great number of end devices:

•Various SOHO devices

• Installed and unattended

•Standard bugs configurations

A manual on insecurity of network appliances SNMP/Telnet/HTTP/UPnP control protocols in the Internet

Insecure/empty passwords

Web attacks on Client’s side (Pinning, CSRF)

Huge number of users • 1 out of1000, for 10 000 000 = 10 000

• Trivial passwords

Page 12: Sergey Gordeychik - How to hack a telecom and stay alive

Broadband Access. Attack

Collecting information

•Network scanning

•Access layer error (BRAS)

•Collecting information from internal forums and other resources

•Self-service platform errors Invalid login or password

vs

Invalid username

Preparing scenarios • Capturing devices

• Guessing passwords

$profit$

Page 13: Sergey Gordeychik - How to hack a telecom and stay alive

Well…yes, it happens

Page 14: Sergey Gordeychik - How to hack a telecom and stay alive

Pick a Task…

Page 15: Sergey Gordeychik - How to hack a telecom and stay alive

Examples of Risks

Gaining access to a self-service portal

• Cashout guessing password or stealing the router cfg files

(vpn/pppoe)

transferring money from a broadband access to a cell phone (integration!)

Cashing out via PRS

• It drives me NUTS!!! Guessing password or stealing the router cfg files (vpn/ppoe)

Purchasing the available

Balance =0

Performing a mass hacking of a router/PC

Performing a mass changing of configurations

Page 16: Sergey Gordeychik - How to hack a telecom and stay alive

Attacks against Clients of Mobile Networks

Faking Caller ID

•self-service portal/USSD

•voice mailbox

•cash-out via PRS

•direct money withdrawal

SS7 Internet Taget

GSM

SIP-GW Tech

Systems FAKE ID unauthorized access

Page 17: Sergey Gordeychik - How to hack a telecom and stay alive

Attacks against Clients of Mobile Networks

Malware for mobile devices;

Intercepting GSM –

Not a ROCKET SCIENCE!

•attacking A5/1

•MITM, switch to A5/0

•downgrading UMTS -> GSM

Traffic, SMS, one-time passwords...

•Self-service portals/USSD

•Cash-out via PRS

•Voice mailbox

Page 18: Sergey Gordeychik - How to hack a telecom and stay alive

Hosting

Local network for collocated/dedicated servers

•Attacks of a network/data link layer, attacks against network infrastructure

•ARP Spoofing, IP Spoofing… old school

•Intrasegment IPv6 attacks

Attack against infrastructure (DNS…)

Shared hosting (once having intruded into one of the sites…)

Page 19: Sergey Gordeychik - How to hack a telecom and stay alive

Pentester Tips & Tricks

|| ||

Page 20: Sergey Gordeychik - How to hack a telecom and stay alive

Pentester Tips & Tricks

We are only searching for vulnerabilities

We use only our own resources for demonstration

We avoid information protected by the law

A fickle client…

C: Prove it! Enter the portal!

P: No, thank you. Here is a password – enter it yourself…

Page 21: Sergey Gordeychik - How to hack a telecom and stay alive

Attacks BY Subscribers

Page 22: Sergey Gordeychik - How to hack a telecom and stay alive

Why Subscribers? AGAIN?

Subscribers are WITHIN one of the perimeters

Many attacks are easier if performed on subscriber’s side

The number of subscribers of modern telecoms is quite large

Page 23: Sergey Gordeychik - How to hack a telecom and stay alive

General Problems

Network access control weakness

Intrasegment attacks

Protection of the end equipment

Web applications for subscribers

Page 24: Sergey Gordeychik - How to hack a telecom and stay alive

Network Access Control Errors

C:\>tracert -d www.ru

Tracing route to www.ru [194.87.0.50] over a maximum of 30 hops:

1 * * * Request timed out.

3 10 ms 13 ms 5 ms 192.168.5.4

4 7 ms 6 ms 5 ms 192.168.4.6

A direct way does not

always mean the most

interesting one :)

Page 25: Sergey Gordeychik - How to hack a telecom and stay alive

Per Aspera Ad…level 15

#sh run

Using 10994 out of 155640 bytes

!

version 12.3

...

!

username test1 password 7 <removed>

username antipov password 7 <removed>

username gordey password 7 <removed>

username anisimov password 7 <removed>

username petkov password 7 <removed>

username mitnik password 7 <removed>

username jeremiah password 7 <removed>

Page 26: Sergey Gordeychik - How to hack a telecom and stay alive

Network Access Control Errors

GPRS/EDGE/3G, which traditionally stick to NAT

Other clients are “invisible”

This is not always true…

GPRS: payment kiosks, ATMs, and etc., which can have: • A missing firewall;

• Missing updates;

• misconfigurations.

Page 27: Sergey Gordeychik - How to hack a telecom and stay alive

A Joke

SNMP ‘private’ on a GGSN

Page 28: Sergey Gordeychik - How to hack a telecom and stay alive

A Joke

Captive portal

“Your balance is low”

•Linux

•Apache

•MySQL

•PHP

Page 29: Sergey Gordeychik - How to hack a telecom and stay alive

Intrasegment Attacks

Subscribers of broadcast access and hosting

Page 30: Sergey Gordeychik - How to hack a telecom and stay alive

Web Portals and Services for Subscribers

A good few of resources

•forums, dating sites, video convertors, online games, statistics, online shopping, photo hosting, file hosting, online radio…

A good few of loopholes

•Old versions of applications and CMS, SQLi, LFI and so on…

Single-Sign-On or the same passwords…

Are often placed into the DMZ together

with “ordinary” servers

Page 31: Sergey Gordeychik - How to hack a telecom and stay alive

Web Portals and Servers for Subscribers

Games server*

Proxima CMS, path traversal

+ SQLi + configuration error= root

About 20 more sites on the host

•Online broadcasting

•Branded desktop applications

•…

Page 32: Sergey Gordeychik - How to hack a telecom and stay alive

Pentester Tips & Tricks

Resources on the subscriber networks are often SUBSCRIBER’s resources

Getting approvals for every step of your work

Many systems operate on a wing and a prayer

They collapse all the time, but if you are online anyway…

Avoiding (!) information protected by the law

A fickle client…

Page 33: Sergey Gordeychik - How to hack a telecom and stay alive

Perimeter… Just a Perimeter

Page 34: Sergey Gordeychik - How to hack a telecom and stay alive

Perimeter?

Large, large networks!

•Use clouds

Great number of “third-party” resources

Get ready for rarities

Corporate web applications

The Lord of The Net

Page 35: Sergey Gordeychik - How to hack a telecom and stay alive

Great Number of Third-Party Resources

Quite a large number of perimeter hosts belong to partners/subscribers

Quite often these hosts are “mixed” with those of the client

Yet, they should not be disregarded

•Imagine that you are already a level 15/root/admin on the host and you just entered the segment

Page 36: Sergey Gordeychik - How to hack a telecom and stay alive

Great Number of Third-Party Resources

SQLi on the mobile content portal (Oracle, sys)

private at the VoIP gateway

Maintained by partners

No hacking

Are actually located at a flat DMZ together with client’s servers

Enabling the billing Front-End

Page 37: Sergey Gordeychik - How to hack a telecom and stay alive

Rarities

So many different things can be found on the perimeter

•Technology “hardware”

•VoIP

•Old-school firewalls

•Web cameras

•Unusual control systems: ELOM, conditioners (!), UPS (!), etc.

Keep in mind the momentous attacks (X-mas scan, UNIX RPC, Finger, and etc.)

Don’t underrate the rarities

Page 38: Sergey Gordeychik - How to hack a telecom and stay alive

Rarities

nc –P 20 xxx.xxx.xxx.xxx 8080

Wireless Access Point • Insecure password for web

•Enabling Telnet

•Compiling tcpdump/nc and others for the platform

•Using them for traffic/tunnel interception

Web camera •LFI via a web interface

•Obtaining configuration files

•Gaining an access password for the control system

•Gaining access to the control system

Page 39: Sergey Gordeychik - How to hack a telecom and stay alive

Journey to Gattaca

Page 40: Sergey Gordeychik - How to hack a telecom and stay alive

Watching the Video

Page 41: Sergey Gordeychik - How to hack a telecom and stay alive

Cobweb

Lots of Web. For real.

Enterprise web applications are often accessible

•Terminal services (Citrix)

•Email systems

•Helpdesk systems

•Ill-equipped for operating on the

“wild web”

Page 42: Sergey Gordeychik - How to hack a telecom and stay alive

Support system

We found and applied Path Traversal ManageEngine ServiceDesk Plus

Gained the “encrypted” password for integration with AD

The password fitted for VPN

The password fitted for AD (Enterprise Admin)

The password fitted for Cisco ACS

So we finally got lucky!

Page 43: Sergey Gordeychik - How to hack a telecom and stay alive

VPN

Lots of VPN, good and not so good

Passwords, IPSec Aggressive Mode…

Page 44: Sergey Gordeychik - How to hack a telecom and stay alive

The Lords of the Net

Administrator, the Lord of the Net

A large network means many administrators

Feudalism •Rules are for wimps

•Enterprise IT infrastructure

VS “my infrastructure”

•Remote access systems

•Amusing web servers and trail

apps

Page 45: Sergey Gordeychik - How to hack a telecom and stay alive

“All animals are equal but…”

Page 46: Sergey Gordeychik - How to hack a telecom and stay alive

The Lords of the Rings

TCP:1337 (SSL) – a web server of the system administration department

Radio broadcasting (ShoutCast Server with a default password)

Location: an administrator workstation

With all the consequences…

Page 47: Sergey Gordeychik - How to hack a telecom and stay alive

Pentester Tips & Tricks

Try not to miss a thing on the perimeter

Keep in mind third-party hosts

Get approvals for every step of your work

Don’t disregard network rarities. Sometimes a web camera can pave the way to the network core!

Pay special attention to Web

Remember admins

Page 48: Sergey Gordeychik - How to hack a telecom and stay alive

Partners and Contractors

Page 49: Sergey Gordeychik - How to hack a telecom and stay alive

Contractors?

Requirements for system access (VPN)

Standard accounts (in order to remember)

No update management

Employees

Page 50: Sergey Gordeychik - How to hack a telecom and stay alive

Contractors…

Contractor in the technology network

•Wireless interface on a laptop

•Everyone, a shared folder

•The folder contains an installer of a control system for xDSL modems/end routers

•With an in-built SA password in DBMS

•Who also has the same system?

Applications for agents, sale and activation of communication services package

•Fat-client application

•Build-in access password for DBMS

•… as SYSDBA

Page 51: Sergey Gordeychik - How to hack a telecom and stay alive

There Are Different Contractors...

OMG?! HAVE I PWND THAT?

Page 52: Sergey Gordeychik - How to hack a telecom and stay alive

Pentester Tips & Tricks

Contractors are never to be hacked

Get approvals for every step of your work

Many scenarios can be efficiently demonstrated by a “white box” method

Suppose, I were a contractor

But you are not a contractor

…A fickle client…

Page 53: Sergey Gordeychik - How to hack a telecom and stay alive

Technology Networks

Page 54: Sergey Gordeychik - How to hack a telecom and stay alive

Something special?

Changes are highly dynamic in the network

• New gadgets keep emerging

• Contractors keep working

• Configuration keeps changing

Implemented components and protocols are standard

• Threats typical for IP

• Configuration errors

• Platform vulnerabilities

Some errors can cause failures and facilitate frauds

Page 55: Sergey Gordeychik - How to hack a telecom and stay alive

Technology Networks Are Networks First of All!

Equipment vulnerabilities

Test systems, contractors’ systems

FORGOTTEN(!) systems

Network management systems

Page 56: Sergey Gordeychik - How to hack a telecom and stay alive

Forgotten Systems

Non-configured switch

Uptime: 2 years!

Page 57: Sergey Gordeychik - How to hack a telecom and stay alive

Network Management Systems

Such treasure

•Network topology

•Device configuration

•Passwords and keys for

VPN/Wi-Fi/SNMP/RADIUS/VPN…

“They are behind the firewall”

+ Web password

- OS, DBMS, Web updates

+ Standard passwords for DBMS

+ File(!) shares

Page 58: Sergey Gordeychik - How to hack a telecom and stay alive

That’s Tough!

WPA-PSK for AP is found

Where are the points located?!!

Page 59: Sergey Gordeychik - How to hack a telecom and stay alive

Backup Is Quite a Useful Thing!

Especially on the Net!

Page 60: Sergey Gordeychik - How to hack a telecom and stay alive

VoIP Is a Honey Pie

VoIP

Access to the

enterprise network

Call management

(fraud)

Fraud or fraudulent

mispresentation

Wiretapping

Identity theft

And more…

Attack against…

infrastructure

gateways

protocols

i[P]Phone

Page 61: Sergey Gordeychik - How to hack a telecom and stay alive

VoIP

PSTN

IP PBX

Компания «А»

ТОПТОП

Вне офиса

Компании «А»

Компьютер

нарушителя

WEP

КЛВС

SQL injection

CVE-2008-0026

2

3

1. VoIP Wi-Fi access (No WPA, so “slow”)

2. The nearest CISCO Call Manager

a) SQLi, CVE-2008-0026

b) Collecting hash

c) Restoring passwords from the hash

3. Level 15 for the whole network

runsql select user,password from applicationuser

https://www.example.org/ccmuser/personaladdressbookEdit.do?key='+UNION+ALL+SELECT+'','','',user,'',password+from+app

licationuser;--

1

Page 62: Sergey Gordeychik - How to hack a telecom and stay alive

Mobile Networks – It’s So Banal

Only the perimeter is secure

Some weird hardware?

• 3G SoftSwitch – Solaris 10 с CVE-2007-0882 (telnet -f)

• …

Page 63: Sergey Gordeychik - How to hack a telecom and stay alive

Self-Service Platform

WEB/USSD/WAP

Interface with payment systems

A possibility of money withdrawal

No authentication (Caller ID)

Weak authentication (PIN-код?)

Vulnerable applications (Web, SQL Injection, XSS)

Page 64: Sergey Gordeychik - How to hack a telecom and stay alive

VAS platforms

Someone’s application on the operator’s network

Malicious content, WAP-provisioning

Rich access via mobile stations (WAP/HTTP):

• Web application vulnerabilities

• Platform vulnerabilities

Platforms for service development

Page 65: Sergey Gordeychik - How to hack a telecom and stay alive

Instead of a Conclusion

Page 66: Sergey Gordeychik - How to hack a telecom and stay alive

Forensic Nightmare

Large networks make it extremely difficult to investigate incidents

Lots of vectors, tons of hardware, a great deal of administrators

A couple of hops on the internal network, and no one will make head or tail of it

Page 67: Sergey Gordeychik - How to hack a telecom and stay alive

Who is there?

Page 68: Sergey Gordeychik - How to hack a telecom and stay alive

Trying To Make Head or Tail…

Page 69: Sergey Gordeychik - How to hack a telecom and stay alive

Some Are Concerned…

Page 70: Sergey Gordeychik - How to hack a telecom and stay alive

Others Are Happy

Page 71: Sergey Gordeychik - How to hack a telecom and stay alive

Thank you for your attention! Sergey Gordeychik [email protected] http://sgordey.blogspot.com http://ptresearch.blogspot.com http://phdays.com