Introduction of pentest with basic network

Shezzar

Üye
20 Ocak 2019
89
3
C#
Hello everyone, in this topic I will talk about entering Pentest with basic network.



- Content of the subject -

- Basic Linux system information (Important Files)

-Basic network information (What are these things? | Network, IP Address, DNS), Network Protocols, Important Ports)

- Active and passive information gathering


- Basic terms about met@sploit



Basic Linux system informationi

At least an intermediate Linux system knowledge is essential to hack the system. Now I will tell you about the most used commands and files after infiltrating a system.
pwd:It shows the index that you are in

9VMHVG.jpg


whoami:It shows which user you are in the system.

C2yV13.jpg


uname -a:It helps us learn the kernel version of system. We will need this information while searching or running Kernel Exploit.

1JzeNB.jpg


ps aux:It lists the services running in the system.
ps aux | grep root:It lists the services running as root in the system.
users:List the users in the system.
ifconfig:It shows the network setting and ip address of the system.
history:It shows all the commands we have already entered into the terminal.
passwd:It allows the user to change their password.

Important files

- /etc/sysconfig/network

- /etc/sysconfig/network-scripts

- /etc/hosts

- /etc/resolv.conf

- /etc/nsswitch.conf

- /etc/services

- /etc/passwd

- /etc/shadow



Basic network information

To perform a network penetration test, we need to have a good level of network knowledge. So that's why I will talk about OSI, TCP/IP, Network Protocols, IP Addressing and Network Devices.

What is network?

S2xSWa.jpeg


It is the network where computers are provided to transfer data through communication lines.

What is IP adress?


z4A7zO.jpeg


It is the address used by devices connected to other packet switched networks that use the Internet or TCP/IP protocol to exchange data between them over the network.

What is DNS?

G30dNM.jpeg


We can think of DNS, which is the domain name system in Turkish, as a notebook that keeps the IP address of the sites we log in. When we click on a domain we enter, we sometimes cannot reach it because the DNS we use directs us or they block that IP for various reasons and they face the error that the site is banned. To solve this problem, we just need to use different DNSs.

OSI Model


7KMBMA.png


With this model, we see how applications running on devices with network will communicate with each other.


4H5OyK.png


In the OSI Model, which consists of 7 layers each layer has certain hardware and network protocols. It is used as an OSI reference model in network communication.

TCP/IP

MM2e2d.png


It is a two layer communication protocol in terms of structure. The sub layer or IP (Internet Protocol) controls the forwarding of the packets to the desired network addresses.

OSI vs TCP/IP

TW9VGI.jpeg


Basically, it sees communication as a complex structure in both models and divides it into sub-tasks and layers. There are protocols and procedures running on each layer.
It is very clearly separated in the OSI model. Protocols running on each layer are clear.
TCP / IP is also more comfortable and not clearly defined. That's why it will be better to carry out our work with OSI. This may be the most important difference between them.

Network Protocols

I will tell you about the most used network protocols.

TCP (Transmission Control Protocol)

It is a protocol that is guaranteed to be accessed over IP and allows data transmission of any size. The difference from UDP is that in TCP, two devices must first be connected to each other to communicate.

UDP (User Datagram Protocol)

UDP ( the user data protocol) enables us to send data over IP. It is not a guarantee that the data will reach the other party. UDP packets have maximum space limits. It is a simple protocol that does not require connection.

DHCP (Dynamic Host Configuration Protocol)

It is used to automatically assign a device connected to a TCP / IP network to an IP address, netmask, gateway and DNS server.

DNS (Domain Name System)

The domain name system is a system that connects IP addresses with domain names / www.forexample.com. It works as a shared database. It can also work over UDP OR TCP.

Important Ports



NK0VIJ.jpeg


Ports are divided into two as hardware and virtual. Basically, it is the way that provides communication between the computer and external devices. Each system running on the system communicating with the internet uses a virtual port. Let's look at the important port numbers and services, you can hack through a system over the vulnerable ones.

- 21 FTP

- 22 SSH

- 23 TELNET

- 25 SMTP

- 53 DNS

-80 HTTP

- 110 POP3

- 115 SFTP

- 135 RPC

- 143 IMAP

- 194 IRC

- 443 SSL

- 445 SMB

- 1433 MSSQL

- 3306 MYSQL

- 3389 Memote



Active and passive information gathering process

- Data collection

- Network mapping

- Weakness scanning procces

- Penteration process

- Gaining access

- Privilege escalation

- Re-search as detailed

- Protection of access

- Reporting



Basic terms about Met@sploit



JPVIIc.jpeg



Met@sploit is a very important security software of rapid7 company. This application provides information about security vulnerabilities and helps us infiltrate them. It is a framework written in Ruby and containing exploits, payloads, auxiliaries and encoders. Postfresql is used as a database. We can perform an nmap scan within the met@sploit.

Vulnerability:Met@sploit is a very important security software of rapid7 company. This application provides information about security vulnerabilities and helps us infiltrate them. It is a framework written in Ruby and containing exploits, payloads, auxiliaries and encoders. Postfresql is used as a database. We can perform an nmap scan within the met@sploit.

Auxiliary:It is an additional module aimed to gathering information about the pre infiltration system.
Exploit:It is an application that allows us to infiltrate the system by taking advantage of system vulnerabilities.
Payload:The application that allows us to act as we want in the system after infiltrating the system.
Shellcode:It is malicious code contained in Exploit.

Encoder:It is an application that helps to pass the exploit through antivirus and firewall.





Translator: Shezzar
Source: https://www.turkhackteam.org/siber-...l-network-ile-penteste-giris.html#post9187825
 
Son düzenleme:
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.