This page has been robot translated, sorry for typos if any. Original content here.

Crawling and hacking a firewall or hacking online

  • [ 1. Introduction ]
  • [2. Principle of detection]
  • [3. Bypass principle]
  • [4. Conclusion]

  • [ 1. Introduction ]

    Many articles describing the principles of circumventing firewalls do not describe the main thing!
    How can I find them ... In this article I will try to fill
    This space and tell you at once about two principles: the principle of detection and
    getting around the firewall ...
    So let's go ...

    [2. Principle of detection]

    As it should be expected, each firewall has its own name, it means it has a certain “stamp” in
    networks, i.e. Some firewalls open specials. port that you can find out
    version, title and other interesting information. When a firewall is detected, you need to be
    very attentive and watch out for your eyes. Essentially Firewall Detection
    divided into several stages ... This is a banal scan, this is tracking routes,
    reading service banners, etc. I will try to tell each detection point
    more details. I also want to say that there are a number of specials. utilities that
    very good help in detecting firewalls ... I will also try to learn more about them
    to tell.

    So, it's time to learn more about the principles of detection.

    A. Banal scan

    I hope many of you have scanned the ports of any IP address on the network ... Every service
    there is a unique port, whether it is ftp (21), http (80), ssh (22), etc., did not go around
    firewalls, but not all ... I must say that not all firewalls listen to the port. Some
    rye disguise themselves as demons like port 23 (they usually have the Cisco Router hanging on them or
    kind) I will give some list of ports on which firewalls sometimes hang or less
    jerry default:
    application: port:
    cisco-manager (mgmt) 4001 (6001, 2001)
    checkpoint DNS (53udp/tcp) RIP (520udp)
    cisco-xremotesrv 9001
    wingate 8080, 81
    realsecure 2998/2997/2999
    This is probably the most common firewall today.
    So, when connected to the above ports, it is possible to consider the service firewall banner.
    But again, I repeat that not always! I will also say that the correctly configured firewall
    won't let you scan ports in the masses, i.e. you will not be able to scan the address if you
    Nirovanija more than one port ... Then really the task of the attacking becomes complicated and
    It is necessary to invent some methods of scanning (whether it be scanning from a substitute source address).
    I also want to say that some firewalls are configured so that the internal network
    access is denied to everyone except their internal network you will not be able to join ports
    that are filtered by the firewall, if you don’t belong to the internal hosting network or
    local network ... Ways to circumvent such protection is not so much. I can only say that one of
    ways to scan "behind the firewall" came up with the well-known former editor of the magazine
    Phrack - Route. Its Firewalk utility is capable of scanning ports behind a firewall. But
    it also does not need to rely on all 100%, that it will correctly scan the ports, since
    Many firewalls are configured so that the firewall can determine the TLL of a packet before
    being (checking the list). Therefore, ICMP type packets notifying of TLL expiration will be detested.
    to go anyway ...

    We now turn to the item about tracking the route of the packet through the network ...

    B. Tracerouting

    I hope many people have come across a program like tracert or traceroute, so I’ll say that
    these programs are able to track the route of the packet through the network ...

    In WIN32 systems, the utility is tracert.exe, and on Unix Like systems, traceroute.

    Let's look at an example of passing a packet to identify a firewall on the way to pass
    Waiting for our udp / icmp package:

    Tracing a route to
    with a maximum number of hops 30:

    1 * 4366 ms * []
    2 3373 ms * 4287 ms []
    3 * 4463 ms * []
    4 * * * Превышен интервал ожидания для запроса.
    5 * * * Превышен интервал ожидания для запроса.
    6 * * * Превышен интервал ожидания для запроса.
    7 * * * Превышен интервал ожидания для запроса.
    8 2274 ms 971 ms 958 ms []
    9 928 ms 945 ms 958 ms []
    10 954 ms 958 ms * []
    11 958 ms 958 ms 971 ms []
    12 981 ms 958 ms 958 ms []
    13 1059 ms 1050 ms 1049 ms []
    14 1050 ms 1037 ms 1036 ms
    15 1041 ms 1050 ms 1063 ms []
    16 1050 ms 1036 ms 1076 ms []
    17 1050 ms 1063 ms 1050 ms []
    18 1050 ms 1062 ms 1076 ms []
    19 1115 ms 1523 ms 1757 ms []
    20 1324 ms 1471 ms 1324 ms []
    21 1141 ms 1141 ms 1141 ms []
    22 1732 ms 1377 ms 1456 ms []
    23 1155 ms 1141 ms 1128 ms []
    24 1404 ms 1181 ms * []
    25 1614 ms 1378 ms 1378 ms

    Tracing completed.

    In the above example, the packet traversing pattern is displayed very vividly.
    It can be assumed that the firewall creates a certain chain of addresses through which our
    package ... In the trace for jumps 1-3 you can observe that the dialup server filters by entering
    packets, then the packet is sent over the network along the chain of addresses ... In the final
    as a result, you can see that our package comes to its destination - ... In this
    case, I can say that most likely the firewall is, although 100 percent re
    I do not give results, because In this case, you need to be extremely attentive ...

    C. Read service banners.

    Well, I think this method is extremely simple, although at the moment it is extremely difficult to find such a fire
    A wall that would display information about itself, but again, “what the hell is not joking” ... Reading
    banners is that when you connect to the firewall, you get some message
    from a remote firewall ... Ie when connecting, for example 295 (CheckPoint Firewall port),
    you will receive information about the version of the firewall, then you can surely go look for
    in bugtraq vulnerability in this firewall, most often when I came across firewalls
    CheckPoint, I got some information, at first I didn’t understand at all that she
    means ... And it consists in the fact that when you connect to the CheckPoint firewall, it is you
    leads a certain sequence of numbers, for example: 30003, 30002, etc. As I later learned that
    this is typical of CheckPoint firewall ...

    Well, in fact, the most common ways to detect an enemy firewall ... Now
    I want to tell you several ways to bypass the detected firewall ...
    So let's go ...

    [3. Bypass principle]

    We start by saying that every firewall is configured to filter the packets that you
    send when you connect to any port of the remote machine. And this is happening on os
    Novel drawn up firewall rules. Those. when connected firewall reads the packet and ana
    lysing all the data ... Ie if your address is not in the firewall database, the firewall will not miss
    you to the internal network ... There are many ways to circumvent the firewall. First, pozh
    Lui is the easiest way to get around this is scanning the firewall's subnet to find vulnerable ma
    tire and subsequent breaking them ... Just say that this method is not always rolls, because ho
    Most likely, the administrator will not put permission to enter the entire subnet;
    will put permission to select network machines ...

    There is another very interesting way: Tunneling ICMP / UDP packets ... It is
    Some firewalls do not have a rule to block ICMP ECHO, ICMP ECHO REPLY,
    UDP All this contributes to a good attack ... I will say I say that this method passes, if you find
    Stay on the subway firewall. For its implementation, you will need two programs - loki, lokid
    (demon). In order to carry out the attack, you should install the daemon behind the firewall and after
    blowing operation using the loki utility ...

    [4. Conclusion]

    The conclusion can be made one - there is nothing perfect! In each device, program and
    etc. there will always be ways to break it, get around it, etc. Of course in this article
    all ways of circumventing firewalls are not presented ... There are a lot of ways ... As one hundred
    chickens appear new devices, new ways will appear ...