Architecture of the firewall and penetration of the firewall using Channel Technology

Source: Internet
Author: User
【Abstract】through the analysis of the firewall architecture, we should understand the firewall architecture and combination methods, and learn about the weaknesses of the firewall, analyzes the possibility and steps of using the channel technology to penetrate the firewall, and proposes the firewall security configuration scheme. 【Key words】 shielded router & nbsp; dual-host gateway & nbsp; screen

【Abstract】through the analysis of the firewall's architecture, understanding the firewall's architecture and combination methods, understanding the firewall's weaknesses, and analyzing the possibility and steps of using the channel technology to penetrate the firewall, in this way, we propose a scheme for firewall security configuration.
【Key words】 shield router dual-host gateway shield host gateway blocked subnet channel port multiplexing http-tunnel intrusion detection

[Title] System structure of the firewall and utilize technology of the tunnel to permeate the firewall
[Summary] Through an analysis of system structure of the firewall, find out about the system structure of the firewall and mode of combination, know the weakness of the firewall, analyze that utilizes technology of the tunnel to permeate possibility and step of the fire wall, thus put forward the scheme disposed safely in firewall.
[Keyword] Screening Router, Dual Homed Gateway, Screened Host Gateway, Screened Subnet, Tunnel, port multipurpose, http-tunnel, IDS

1. firewall architecture
The architecture of a firewall can be divided into the following situations:
1. Screening Router)
This is the most basic component of the firewall. It can be implemented by a router specially produced by the manufacturer, or by a host. Shield the router as the only channel for internal and external connections. all packets must pass the check here. The IP layer-based packet filtering software can be installed on the router to implement packet filtering. Many routers have packet filtering configuration options, but they are generally relatively simple.
The danger zone of a firewall consisting of a shield router includes the router itself and the host allowed by the router. Its disadvantage is that once attacked, it is difficult to discover and cannot identify different users.
2. Dual-host Gateway)
Any system with multiple interface cards is called multi-host. the dual-host Gateway uses a host with two NICs as a firewall. The two NICs are connected to the protected network and the external network respectively. The host runs firewall software, which can forward applications and provide services.
The system software of the Bastion host is used to maintain system logs, copy hardware logs, or remote logs. This is useful for future checks. However, this does not help network administrators determine which hosts on the intranet may have been infiltrated by hackers.
A critical weakness of the dual-host gateway is that, once an intruder intrude into the bastion host and only has the routing function, any online user can access the intranet.
3. Screened Host Gateway)
The shielding host gateway is easy to implement and secure, so it is widely used. For example, if a group filters vrouters to connect to an external network and a bastion host is installed on an internal network, a filtering rule is usually set up on the vro, the bastion host becomes the only host that can be directly accessible from the external network, which ensures that the internal network is not attacked by unauthorized external users.
If the protected network is a virtual extended ingress network, that is, there is no subnet or router, the changes in the intranet will not affect the configurations of the Bastion host and the shielded router. Dangerous tapes are restricted to Bastion hosts and blocked routers. The basic control policy of the Gateway is determined by the software installed above. If attackers try to log on to it, other hosts in the intranet will be greatly threatened. This is similar to the situation when the host gateway is under attack.
4. Screened Subnet)
This method establishes an isolated subnet between the internal network and the external network, and uses two groups to filter the vro to separate the subnet from the internal network and the external network respectively. In many implementations, the two groups filter routers at both ends of the subnet and form an "unmanaged zone" DMZ in the subnet. Some shield subnets also have a bastion host as a unique accessible point, supporting terminal interaction or as an application gateway proxy. This configuration only includes the Bastion host, subnet host, and all vrouters connected to the intranet, Internet, and subnet shield.
If an attacker attempts to completely damage the firewall, he must reconfigure the routers connected to the three networks, neither disconnect the connection nor lock himself out, without making himself discover, this is also possible. However, if you disable network access to a vro or only allow some hosts in the intranet to access it, the attack will become very difficult. In this case, the attacker must first intrude into the bastion host, then enter the intranet host, and then return to destroy the blocked Router. no alarm is triggered throughout the process.

II. combination of firewalls
Generally, a single technology is rarely used when building a firewall. it is usually a combination of multiple technologies to solve different problems. This combination mainly depends on what kind of services the network management center provides to users and what level of risks the network management center can accept. Which technology is used depends on the fund, the size of the investment, or the technology and time of the technicians. There are generally the following forms:
1. use a multi-bastion host;
2. Merge internal routers and external routers;
3. Merge the Bastion host and external router;
4. Merge the Bastion host and internal router;
5. use multiple internal routers;
6. use multiple external routers;
7. use multiple peripheral networks;
8. use a dual host and a shielded subnet.

III. firewall disadvantages
Well-configured firewalls will block the vast majority of crackers from the periphery and take the initiative in network control. However, firewalls are not omnipotent,
1. the firewall cannot prevent attacks that bypass the firewall. For example, the firewall does not limit connections from the internal network to the external network, so some internal users may form a direct connection to the Internet, thus bypassing the firewall, resulting in a potential backdoor. Malicious external users are directly connected to the internal user's machine and use the internal user's machine as a stepping stone to initiate unrestricted attacks that bypass the firewall.
2. the firewall is not an Interscan, and cannot intercept virus-containing data transmitted between networks.
3. the firewall cannot perform data-driven attacks.

IV. Channel technology penetration firewall
Speaking of the channel technology, let's first look at the "Port reuse" technology. many friends think that the channel technology is the port reuse technology. If so, port multiplexing means that multiple connections are established on a port, rather than opening multiple services on a port without mutual interference. If you want to add another service on port 80 on a host that has opened the WWW service, there are only two possibilities: 1. Failed to add service 2. WWW service error. So what is a channel? The channel is a communication method that bypasses firewall Port shielding. Packets at both ends of the firewall are encapsulated on the data packet type or Port allowed by the firewall, and then communicate with the host behind the firewall through the firewall. when the encapsulated data packet arrives at the destination, data packets are restored and the restored data packets are sent to the corresponding service. multiple services are opened on a port without mutual interference.
For communication, no matter what firewall, all services and ports cannot be closed. Most firewalls must open a port or service (such as HTTP) more or less. as long as ports and services are opened, penetration is possible. HTTP is a simple and commonly used protocol. when you send a request to the server, the server returns a response. Almost all hosts are allowed to send HTTP requests. The extensive use of the HTTP protocol on the network also determines that we can easily send the data we need to the target through the firewall or other similar devices by using the channel technology. A typical example is http-tunnel.


On the official http-tunnel website http://www.http-tunnel.com/, let's talk: http-tunnelcreates a dual-direction virtual data connection in the http request. HTTP requests can be sent through a proxy, which can be used by users behind the firewall with a limited port. If the WWW browsing through the HTTP proxy is allowed, the http-tunnel can also be established, that is, it can be telnet or PPP outside the firewall to the firewall ." In this way, attackers can use this technology to achieve remote control. Let's take a look at the http-tunnel design ideas:
Host A is outside the firewall without any restrictions. Host B is protected by the firewall inside the firewall. the access control principle configured by the firewall is to allow data access from Port 80 only, but the telnet service is enabled on the host. What should I do if I need to Telnet from system A to System B? Normal telnet is definitely not possible because the port 23 used by telnet is blocked by the firewall. after the firewall receives the telnet package, if it finds that it does not comply with the filter principle that only allows data passing through port 80, it is discarded. But we know that there are available port 80, so using the Httptunnel channel at this time is a good way, the idea is as follows:
Run the tunnel client on machine A to let it listen to an unused arbitrary specified port on the local machine (preferably over 1024 and below 65535), for example, 8888. At the same time, the data from port 8888 is directed to port 80 of port B. because it is port 80, the firewall is allowed to pass. Then, start a server on Machine B (only one WEBSHELL can be obtained when port 80 is open to the outside, and you can find a way to upgrade your permissions and run the server) it is also attached to port 80, and the port 80 is forwarded from the client to the local telnet service port 23, so that it is OK. Now telnet the local port 8888 on machine A. According to the preceding settings, the data packet will be forwarded to the Machine B with the target port 80, because the firewall allows data through port 80, as a result, data packets pass through the firewall smoothly and reach Machine B. In this case, the process listening on port 80 receives A packet from A, restores the packet, and returns it to the telnet process. When the data packet needs to be returned from B to A, it will be sent back from port 80, and it can also pass through the firewall smoothly.
The above functions seem to be capable of doing the same with Port ing. we can redirect port 23 on host A to port 80, and then redirect port 80 on host B to port 23. But what if the WWW service is enabled on host B? To use the above functions, port 80 of host B must be sacrificed for Port ing. this is not worth the candle. Imagine how long can you stay on a host when someone else has already enabled the WWW service in an attack by the penetration firewall? However, http-tunnel can be used perfectly. even if host B is already open to 80 and WWW is provided, we can still send telnet to port 80, enjoy the "genuine" telnet service.
For Channel technology, our solution uses the packet detection technology at the application layer, because in normal HTTP requests, GET, POST and other actions are essential, if there is always no GET or POST in an HTTP request from a connection, there must be a problem with this connection. Terminate the connection. Currently, some companies can find the tunnel hidden in 80, but the cost of these IDS products is probably not what small and medium enterprises can afford.
There are still some ways to penetrate the firewall, such as looking for the design defects of the firewall itself, but those are too difficult.

5. key points of firewall security configuration
Now we should know more clearly that firewalls are not omnipotent, and even well-configured firewalls cannot resist channel programs hidden in seemingly normal data. That

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.