Recover BGP password(JUNOS)

From Juniper Clue

# Get a root shell:
user@router> start shell
% su - root
Password:
root@router%

# View the contents of /var/etc/keyadmin.conf
root@router% less /var/etc/keyadmin.conf

tcp 179 0.0.0.0 10.0.0.1 md5 instance default 0x6162636431323334
tcp 179 :: 2001:DB8:1::1 md5 instance default 0x313233717765727479

# Run the following command on a system with Perl :
user@box:~>perl -e 'print "Hex: ";$_=<>;print "MD5: ";s/(\w\w)/\1:/g;for (split(/:/)) {printf "%s", chr(hex($_))};print "\n"'
Hex: 0x6162636431323334
MD5: abcd1234

user@box:~>perl -e 'print "Hex: ";$_=<>;print "MD5: ";s/(\w\w)/\1:/g;for (split(/:/)) {printf "%s", chr(hex($_))};print "\n"'
Hex: 0x313233717765727479
MD5: 123qwerty

That's it! Many thanks for the person who provided me this code and to the person who developed it :)
 
 
PS by lotson:
"a system with perl" means a system that have the "perl" command, just like ubuntu and so on.
And I have test the method above myself, and it works well!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章