• No results found

Securing Web Applications...at the Network Layer

N/A
N/A
Protected

Academic year: 2021

Share "Securing Web Applications...at the Network Layer"

Copied!
22
0
0

Loading.... (view fulltext now)

Full text

(1)

Internet Internet

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices www.jessland.net

Securing Web Applications...

...at the Network Layer

Carlos Fragoso Mariscal

Chief Technical Director

[email protected]

OWASP Spain Chapter Meeting

16thJune, 2006 – Barcelona (ES)

2

2 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Consider network security as a defense-in-depth

approach for web application security



Learn how security architecture could provide a

robust topology to enforce security in web

services environments



Have fun with our case-based scenario

(2)

3

3 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Web Applications



Security Architecture



Case Study



Conclusions



References

Agenda

4 4 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Web Applications



Security Architecture



Case Study



Conclusions



References

Agenda

(3)

5

5 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

 Web application clients mainly use HTTP protocol as their interface to the application

 Users (B2C) and hosts (B2B) reside on external or business partners networks

Web Applications’ Interface

6

6 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

 Some web applications are not able to separate interface and application layers so they are just one

 Data layer is commonly a filesystem or a database

Interface

Interface

Application

Application

Data

Data

(4)

7

7 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

 First operational and security approach is to separate the EVERY layers on DIFFERENT hosts

Interface

Interface

Application

Application

Data

Data

Web Application Layers’ segmentation

8

8 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Web Applications



Security Architecture



Case Study



Conclusions



References

Agenda

(5)

9

9 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Defense-in-depth



Technology balance



Least privilege principle



Simplicity



Biodiversity



Access control



Operational/Risk balance



Escalability



Redundancy

Design Parameters

10 10 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

(6)

11

11 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Internet



Extranets

–Business partner or remote sites



DMZ’s

–External

–Internal



Intranets

–Users network

–Protected network

Security Areas

12 12 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Firewalls



Routers



Switches



Intrusion Detection/Prevention Systems



Honeypots and Honeynets



Security Event Managers



Servers



Desktop and mobile end-user systems



Wireless Access Points



Hybrids

(7)

13

13 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Security policy



Security levels classification



Deploy network devices



Segmentation with firewalls



Deploy additional security devices

–IDS/IPS

–Content inspection

–VPNs

Network Design step-by-step

14

14 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Interconnects different security level networks

providing traffic access control



Technology:

– Stateless: each packet handled individually – Stateful: keeps state of network flows

– Stateful Inspection: understand application layer protocols



Value-added features:

– Load balancing, failover, address translation, VPNs, packet normalization, content inspection, etc.



Ruleset:

– Firewall lockdown – No logging – Log denied – Sneaky rule

Network Firewalls

(8)

15

15 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

DMZ ext DMZ int DMZ Protegida Internet R int M ext R ext Red Protegida M R M int Intranet 1 Intranet 2 DMZ ext DMZ int DMZ Protegida Internet R int M ext R ext Red Protegida M R M int Intranet 1 Intranet 2 16 16 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Their job is to provide network audit features and

intrusion detection/prevention over the network



Types: network, node (IDS) and in-line (IDS, IPS)



Traffic capture: taps, hubs, span ports, balancing...



Advantages:

– Easy to deploy – Effective – Good scalability



Disadvantages

– False positives – False negatives – Non-textual alarms – High-volume of data – Ciphered traffic



An IPS is not a firewall !!!

(9)

17

17 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

Workstations Servers External Services ID Network IDS Management & Analysis Log Server / SEM 18 18 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Critical information must be placed FAR

AWAY from possible risky areas



Network security does NOT patch your

hosts for you!



Some critical services have a low rate of

possible vulnerabilities because they have

been heavily tested



Sometimes information must be replicated

to give a limited-scope view

(10)

19

19 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

Prevention

Prevention

Detection

Detection

Reaction !

Reaction !

20 20 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Web Applications



Security Architecture



Case Study



Conclusions



References

Agenda

(11)

21

21 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

Hackobo vs Armando

Clueless to smart admin 3l33t to

deceived hacker

Security Architecture Case Study

22

22 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

Intranet Intranet Internet External Servers Workstations Internal Server

 Corporate network grew WITHOUT a security-minded approach  Several security INCIDENTS lead to a security architecture redesign  Let’s help Armando about how to face common issues on his way to a

new architecture deployment

(12)

23

23 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

 External users access external servers

 Some external servers (web, app, dns, smtp) need to access internal server

 Workstation users manage servers and have Internet access Intranet Intranet Internet External Servers Workstations Internal Server

Identify how systems talk to each other

24

24 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

Intranet Intranet Internet External Servers Workstations Internal Server

 Internal server contains corporate “JEWELS OF THE CROWN  Workstation users manage corporate infrastructure

 External servers provide services to the outside  Internet is a public, least-secure, network

(13)

25

25 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

 LACK of firewalling

 DIFFERENT security areas in the SAME network Intranet Intranet Internet External Servers Workstations Internal Server Oh my god !

Step 0: Plain Network

26

26 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

t00 e9sy f0r m3!

1. Reconaissance and exploit launch to compromise external web server

2. Internal reconaissance attack trying to compromise internal workstations or servers

Intranet Intranet Internet External Servers Workstations Internal Server

(14)

27

27 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices  Sharing the DMZ between critical services

(dns, smtp) and the web server

Still a lot to do ! External Servers Internal Servers Workstations DMZ DMZ Intranet Intranet Internet Internet Internet

Step 1: DMZ deployment

28 28 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

P1nch3 9dm1n !

1. Reconaissance and exploit launch to compromise Armando’s external web server

2. Firewall allows web server to download hacking tools 3. Local layer-3 compromise or DoS attack against

DNS and SMTP external servers

External Servers Internal Servers Workstations DMZ DMZ Intranet Intranet Internet Internet Internet

Step 1: DMZ deployment

(15)

29

29 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

DMZ VLAN 3VLAN 4 DMZ VLAN 2 VLAN 3 VLAN 4 External Servers Internal Servers Workstations Intranet Intranet Internet Internet Internet Looks better !

 Logical isolation (VLAN) on the same physical switch could encourage the hacker to perform L2 DoS or VLAN hopping attacks  Same software vendor could ease multilayer compromise

Step 2: VLAN-based DMZ deployment

30

30 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

a) Compromise webserver and perform layer-2 vlan hopping in order to try to breach the other servers

b) Launch exploit against smtp or dns server and relaunch it again to get internal access (nicer if possible)

h3h3, n1c3 try ! DMZ VLAN 3VLAN 4 DMZ VLAN 2 VLAN 3 VLAN 4 External Servers Internal Servers Workstations Intranet Intranet Internet

(16)

31

31 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

DMZ VLAN 3VLAN 4 DMZ-2 VLAN 3VLAN 4 External Servers Internal Servers Workstations Intranet Internet Internet Internet

I’m doing my best!

 Vulnerability over the single firewall could allow direct communication to intranet

 Malware injection could compromise workstations DMZ-1

External Server

Step 3: Dual public DMZ

32

32 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

DMZ VLAN 3VLAN 4 DMZ-2 VLAN 3VLAN 4 External Servers Internal Servers Workstations Intranet Internet Internet Internet

a) Specially crafted packets are sent so that filtering is overcomed and sent directly to internal server

b) Malware is injected through a URL (malware site) on fake email

DMZ-1

Br3ak d9 p3r1m1t3r

External Server

(17)

33

33 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

 Vulnerabilities such as SQLInjection on AppServer or Internal Server database could compromise the boxes and probably disclose sensitive information

VLAN 3VLAN 4 DMZ-2 VLAN 3VLAN 4 External Servers Database Server Workstations Intranet Internet Internet Proxy DMZ-1 Internal Servers Web

Server ServerApp

Paranoia is your friend

Step 4: Multilayered service-leg-based double DMZ

34

34 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

1. Reconaissance against web/app server to identify database internal server

2. Perform SQL Injection in order to get sensitive data back to the hacker VLAN 3VLAN 4 DMZ-2 VLAN 3VLAN 4 External Servers Database Server Intranet Internet Internet Internet Proxy DMZ-1 Internal Servers Web

Server ServerApp

W0w, th9t’s n0t 39sy

Workstations

(18)

35

35 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

Yiiiiiihaaaaaa !!! VLAN 3VLAN 4 DMZ-2 VLAN 3VLAN 4 External Servers Database Server Workstations Intranet Internet Internet Internet Proxy DMZ-1 Internal Servers Web

Server ServerApp

Internal Database

 Database replication of necessary data Protected Network

Step 5: Protected Network with Data Replication

36

36 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Lack of multilayer firewalling



Sharing of different network security areas



Outbound traffic control on DMZ areas



“Relaxed” server patching policy



Shared resource used for critical information



Logical vs physical isolation



OS, Software and hardware biodiversity



Sensitive data access

(19)

37

37 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

Intranet Intranet Internet External Servers Workstations Internal Server VLAN 3VLAN 4 DMZ-2 VLAN 3VLAN 4 External Servers Database Server Intranet Internet Internet Internet Proxy DMZ-1 Internal Servers Web

Server ServerApp

Internal Database Protected Network

Bad old days

Impressive

Long life to Armando’s network

38

38 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Web Applications



Security Architecture



Case Study



Conclusions



References

Agenda

(20)

39

39 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Security architecture definitively helps to improve

the global state of security for web services



It is highly recommended to separate interface,

application and data layers



Knowing your environment is half-the-battle in order

to choose a good topology approach



Place hosts according to their data security level,

sometimes splitting or replicating the information is

necessary



What has been described makes thing MORE difficult

to the hacker but NOT impossible! 







Conclusion

40

40 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices



Web Applications



Security Architecture



Case Study



Conclusions



References

Agenda

(21)

41

41 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

 “Inside Network Perimeter Security”, S.Northcutt









ISBN: 0735712328

 “The Tao of Network Security Monitoring”, R.Beijlitch









ISBN: 0321246772

 “Jessland Information Security Knowledgebase (JISK)” 

 

URL: http://www.jessland.net/JISK.php

 “Protecting your IP network infrastructure”, Securite.og 

 

URL: http://www.securite.org/presentations/secip/

 “Network Intrusion Detection”, S.Northcutt & Judy Novak









ISBN: 0735710082  “Warriors of the Net”

   URL: http://www.warriorsofthenet.com

References

42 42 www.jessland.net

1st OWASP Spain Chapter Meeting

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

Take care of your perimeter !!!

E3B5 8908 57CA 5B67 83DD 9400 085A 29FF D539 69A3

[email protected]

(22)

43

43 www.jessland.net

Securing Web Applications at the Network Layer

Securing Web Applications at the Network Layer--©©2006 2006 JesslandJesslandSecuritySecurityServicesServices

E3B5 8908 57CA 5B67 83DD 9400 085A 29FF D539 69A3

http://carlos.fragoso.es [email protected]

References

Related documents

HEWs spend 80% of their time in their community working in the area of preventative health care and health education, including services such as family planning, EPI, Outpatient

controller is squarely situated in the panel cut-out as shown in the figure to the right.. Note : For UL listed module, in order to meet the UL508 standard, panel-mount

Welcome to the online exhibitor service kit for the upcoming Saltwater Fishing Expo being held at the Garden State Exhibit Center on March 18-20, 2016.. This letter

configure vlan blue add ports 3 tagged configure vlan blue add ports 4 untagged configure vlan blue ipaddress 192.168.1.2/24 enable ipforwarding blue.. You can view VLAN IP

Internet vlan 100 vlan 200 (outside) vlan 221 (inside) vlan 223 vlan 222 Context A MSFC ISP router inside DMZ1 DMZ2 Cat6000 switch vlan 200 (outside) vlan 231 (inside) vlan 233 vlan

LACP, LLDP, CDP, MTU Leaf Ports + Policies AEP VMM Domain Physical Domain External Domain VLAN Pool 1 VLAN Pool 2 VLAN Pool 3 vCenter Virtual Distributed Switch. 4K

Multihypervisor-Ready Fabric Hypervisor Integration Network Admin Application Admin PHYSICAL SERVER VLAN VXLAN VLAN NVGRE VLAN VXLAN VLAN ESX Hyper-V KVM Hypervisor Management.

Private Server Subnet With X:1 NAT Public Network firewall router private switch or VLAN dmz switch or VLAN private switch or VLAN web server file server collaboration server