Portál AbcLinuxu, 12. května 2025 08:50

Dotaz: hack přes quaggu

Johny z Podoli avatar 19.11.2006 13:30 Johny z Podoli | skóre: 26 | blog: rocfdebian
hack přes quaggu
Přečteno: 370×
Odpovědět | Admin
ahoj, neptejte se proč, ale přepsáním libc6 knihoven se stalo, že po restartu systému nenaběhlo SSH. Teď se snažíme na "routr" dostat. Bohužel, router je na stořáru od antény a není přístupný.

potřčebuji smazat 3 soubory a původní "soubory.bak" přejmenovat aby vše zase chodilo.

SSH nenaběhne, na routeru jede jenom quagga (routovaci deamon) do kterého se dostanu telnetem
sea:~# telnet router 2601
Trying router...
Connected to router.
Escape character is '^]'.

Hello, this is quagga (version 0.96.4).
Copyright 1996-2002 Kunihiro Ishiguro.


User Access Verification

Password:
dwarf>
     
a na co se ptám?

Jak pomocí quaggy nějakým trikem získat shell? root heslo cílového routeru znám. Přemýšlím, zda nějak nejde třeba pustit /bin/sh a pod.

Nenapadá vás něco?

dík za jakýkoliv nápad..

Starting Nmap 4.03 ( http://www.insecure.org/nmap/ ) at 2006-11-19 13:28 CET
Interesting ports on router:
(The 1671 ports scanned but not shown below are in state: closed)
PORT     STATE SERVICE
22/tcp   open  ssh
2601/tcp open  zebra
2604/tcp open  ospfd

Nmap finished: 1 IP address (1 host up) scanned in 13.003 seconds
a takto se chova ssh

sea:~# ssh -v router
OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to router port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.4p1 Debian 1:3.4p1-1.woody.3
debug1: match: OpenSSH_3.4p1 Debian 1:3.4p1-1.woody.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1 Debian-8.sarge.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'router' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:32
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
Connection closed by router
Můj web o táborech: Letní dětské tábory, Hudební tábor , Můj nový blog na Nul.cz
Nástroje: Začni sledovat (2) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

19.11.2006 14:35 xxl
Rozbalit Rozbalit vše Re: hack přes quaggu
Odpovědět | | Sbalit | Link | Blokovat | Admin
Řekl bych, že ssh naběhlo. Jenom vás tam nechce z nějakého důvodu pustit. Takže bych napřed zkoušel vyzkoumat, proč.
Johny z Podoli avatar 19.11.2006 14:43 Johny z Podoli | skóre: 26 | blog: rocfdebian
Rozbalit Rozbalit vše Re: hack přes quaggu
bohužel, na ten systém se nedostanu, tedy nevím, jak "zkoumat" co se tam děje.

dejte nějaký podnět a rád to prověřím.

J.
Můj web o táborech: Letní dětské tábory, Hudební tábor , Můj nový blog na Nul.cz
19.11.2006 18:04 xxl
Rozbalit Rozbalit vše Re: hack přes quaggu
Přidejte ssh podle potřeby další -v
Johny z Podoli avatar 19.11.2006 18:08 Johny z Podoli | skóre: 26 | blog: rocfdebian
Rozbalit Rozbalit vše Re: hack přes quaggu
No, to jsem dělal, jenom jsem tím nechtěl zatěžovat diskuzi na abíčku, kompletní debug je dole, ale stejně nevidím nic, co by mi napovídalo jak se tam dostat :(
OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to router [peke] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.4p1 Debian 1:3.4p1-1.woody.3
debug1: match: OpenSSH_3.4p1 Debian 1:3.4p1-1.woody.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1 Debian-8.sarge.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 126/256
debug2: bits set: 521/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 32
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 32
debug1: Host 'router' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:32
debug2: bits set: 532/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /root/.ssh/identity ((nil))
debug2: key: /root/.ssh/id_rsa ((nil))
debug2: key: /root/.ssh/id_dsa ((nil))
Connection closed by peke

Můj web o táborech: Letní dětské tábory, Hudební tábor , Můj nový blog na Nul.cz
22.11.2006 19:30 xxl
Rozbalit Rozbalit vše Re: hack přes quaggu
To ssh na stožáru vypadá, že zkolabuje při dohadování způsobu authentikace a ukončí spojení. Tipuji to na návštěvu stožáru :-(

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.