hacktricks/network-services-pentesting/1080-pentesting-socks.md
2024-02-11 02:13:58 +00:00

7.7 KiB

1080 - Kupima Usalama wa Socks

Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)!

Njia nyingine za kusaidia HackTricks:

Taarifa Msingi

SOCKS ni itifaki inayotumiwa kwa kuhamisha data kati ya mteja na seva kupitia proksi. Toleo la tano, SOCKS5, linaongeza kipengele cha uwakiki kinachoruhusu watumiaji waliothibitishwa tu kupata seva. Inashughulikia hasa kupeleka uhusiano wa TCP na kuhamisha pakiti za UDP, ikifanya kazi kwenye safu ya kikao (Safu ya 5) ya mfano wa OSI.

Bandari ya Chaguo-msingi: 1080

Uchunguzi

Ukaguzi wa Uthibitishaji

nmap -p 1080 <ip> --script socks-auth-info

Matumizi ya Msukumo wa Nguvu

Matumizi ya Msingi

Kutumia msukumo wa nguvu ni njia ya kawaida ya kuvunja nywila. Kwa kufanya jaribio la msukumo wa nguvu, unaweza kujaribu nywila tofauti kwa kuingiza moja kwa moja kwenye mfumo unaolindwa. Hii inaweza kufanyika kwa kutumia programu maalum za msukumo wa nguvu kama Hydra au Medusa.

Kwa mfano, unaweza kutumia Hydra kwa kufanya jaribio la msukumo wa nguvu kwenye seva ya SSH. Unaweza kuanzisha jaribio hili kwa kutoa orodha ya nywila zinazowezekana na jina la mtumiaji. Hydra basi itajaribu kila nywila kwenye orodha hadi itapata ile sahihi.

Kwa kufuata hatua hizi, unaweza kufanikiwa kuvunja nywila na kupata ufikiaji usioidhinishwa kwenye mfumo unaolindwa. Hata hivyo, ni muhimu kutambua kuwa matumizi ya msukumo wa nguvu yanaweza kuwa kinyume cha sheria na yanaweza kusababisha madhara makubwa. Kwa hivyo, ni muhimu kuzingatia sheria na kufanya msukumo wa nguvu tu kwa idhini ya mmiliki wa mfumo unaolindwa.

nmap --script socks-brute -p 1080 <ip>

Matumizi ya juu

Socks Proxy

A Socks proxy is a protocol that allows a client to establish a connection through a firewall by using a proxy server. It can be used to bypass network restrictions and access resources that are otherwise blocked.

Socks4

Socks4 is an older version of the Socks protocol that only supports TCP connections. It does not support authentication, so anyone can use it to connect to a Socks server.

Socks5

Socks5 is the newer version of the Socks protocol and supports both TCP and UDP connections. It also supports authentication, allowing for more secure connections. Socks5 can be used with various authentication methods, including username/password, GSSAPI, and SSL/TLS certificates.

Socks Proxy Chains

Socks proxy chains involve using multiple Socks proxies in a series to route traffic through different servers. This can help to further obfuscate the source of the traffic and make it more difficult to trace.

Socks Proxy Forwarding

Socks proxy forwarding involves forwarding traffic from a local Socks proxy to a remote Socks proxy. This can be useful in scenarios where the remote Socks proxy has access to resources that are not directly accessible from the local network.

Socks Proxy Tunnels

Socks proxy tunnels involve encapsulating traffic within a Socks proxy connection. This can be useful for bypassing network restrictions or for creating encrypted tunnels for secure communication.

Socks Proxy Wrappers

Socks proxy wrappers are tools that can be used to wrap existing applications with Socks proxy functionality. This allows the application to use a Socks proxy without requiring any modifications to the application itself.

Socks Proxy Tools

There are various tools available for working with Socks proxies, including proxychains, ProxyCap, and SocksCap. These tools can be used to configure and manage Socks proxies, as well as to route traffic through them.

nmap  --script socks-brute --script-args userdb=users.txt,passdb=rockyou.txt,unpwdb.timelimit=30m -p 1080 <ip>

Mbinu za Kudukua Huduma za Mtandao

Kudukua Socks

Socks ni itifaki ya mtandao inayotumiwa kwa kuunganisha watumiaji na seva ya proxy. Inaruhusu watumiaji kufanya uhusiano wa mtandao kupitia seva ya proxy, ambayo inaweza kusaidia kuficha anwani ya IP ya mtumiaji halisi.

Kudukua Socks kunaweza kufanyika kwa njia kadhaa, ikiwa ni pamoja na:

  1. Kuchunguza Socks Proxy: Unaweza kutumia zana kama Nmap au ProxyChains kuchunguza seva za Socks Proxy zinazopatikana kwenye mtandao.

  2. Kudukua Socks Proxy: Mara tu unapopata seva ya Socks Proxy, unaweza kujaribu kudukua akaunti zilizopo kwenye seva hiyo kwa kutumia mbinu kama vile kujaribu nywila za kawaida, kudukua maelezo ya kuingia, au kutumia mbinu za kudukua zilizojulikana.

  3. Kudukua Mawasiliano ya Socks: Unaweza kudukua mawasiliano ya Socks kwa kusikiliza trafiki ya mtandao inayopita kati ya mteja na seva ya proxy. Hii inaweza kufanyika kwa kutumia zana kama Wireshark au mitambo ya kusikiliza trafiki.

Kwa kudukua Socks, unaweza kupata ufikiaji usioidhinishwa kwa mifumo ya mtandao, kufikia rasilimali zilizozuiliwa, au kuficha anwani yako ya IP halisi. Ni muhimu kwa wataalamu wa kudukua kuelewa mbinu hizi ili kuboresha usalama wa mifumo ya mtandao.

PORT     STATE SERVICE
1080/tcp open  socks
| socks-brute:
|   Accounts
|     patrik:12345 - Valid credentials
|   Statistics
|_    Performed 1921 guesses in 6 seconds, average tps: 320

Kuchimba na Kusogeza Bandari

Matumizi ya msingi ya proxychains

Sanidi proxy chains kutumia socks proxy

nano /etc/proxychains4.conf

Edit the bottom and add your proxy

Swahili Translation:

Badilisha sehemu ya chini na ongeza proksi yako

socks5 10.10.10.10 1080

Na uthibitisho

socks5 10.10.10.10 1080 username password

Taarifa zaidi: Tunneling na Port Forwarding

Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)!

Njia nyingine za kusaidia HackTricks: