Netcat shell zabezpieczony hasłem

Prosty skrypt autorstwa Vittorio Milazzo ukazujący sposób przyznania powłoki za pomocą netcat dopiero po podaniu hasła:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
ncpassword () {
NC="/bin/netcat"
PORT="999"
PASSWORD="123456"
SHELL="/bin/bash"
 
echo -n "Enter password: "
 
stty -echo
read  mypass
stty echo
 
if [ ${mypass} = $PASSWORD ]
  then
    echo "Access granted...start netcat shell on port $PORT"
    while true; do $NC -l -p $PORT -e $SHELL; done
  else
    echo "Incorrect Password"
fi
}
 
ncpassword
sh $0
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Fałszujemy rozpoznania skanerów #1
Viewed 2248 times since Mon, May 21, 2018
python learning
Viewed 1070 times since Wed, Dec 18, 2019
RHCS6: Luci - the cluster management console
Viewed 2317 times since Sun, Jun 3, 2018
Inxi: Find System And Hardware Information On Linux
Viewed 1490 times since Sat, Jun 2, 2018
rabbitmq Troubleshooting TLS-enabled Connections
Viewed 1279 times since Sun, Dec 6, 2020
Top 25 Best Linux Performance Monitoring and Debugging Tools
Viewed 4835 times since Sun, Sep 30, 2018
RHEL: Manually encrypting a filesystem with LUKS
Viewed 2839 times since Sun, May 27, 2018
logrotate Log Rotate Configuration
Viewed 2391 times since Sun, Jan 12, 2020
20 Linux YUM (Yellowdog Updater, Modified) Commands for Package Management YUM
Viewed 10206 times since Thu, Oct 25, 2018
RHEL: Route network packets to go out via the same interface they came in
Viewed 2019 times since Sat, Jun 2, 2018