记docker安装和ida远程调试问题

docker安装

1、卸载可能存在的旧版本:

sudo apt-get remove docker docker-engine docker-ce docker.io

   如果想要彻底卸载docker:

sudo apt-get remove docker-ce docker-ce-cli

2、更新apt包索引

sudo apt-get update

3、安装以下包以使apt可以通过HTTPS使用存储库(repository)

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

4、添加Docker官方的GPG密钥

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

5、使用下面的命令来设置stable存储库

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

6、再更新一下apt包索引

sudo apt-get update

7、安装Docker CE

sudo apt-get install docker-ce

8、验证docker安装成功

查看docker版本:

docker -v

 查看docker服务启动:

systemctl status docker

未启动,启动docker服务:

sudo systemctl enable docker        //开机自启
sudo systemctl start docker     //开启docker服务

  附:

当sudo service docker  start 命令出现:
Failed to start docker.service: Unit docker.service is masked.
解决办法:
systemctl unmask docker.service 
systemctl unmask docker.socket
systemctl start docker.service
(未测试)

如果出现docker权限问题:

sudo groupadd docker

sudo usermod -aG docker $USER      //$USER为用户名
reboot

 

ida调试错误

ida出现: The file can't be loaded by the debugger plugin. Please verify that the parameters are valid.

 

提示无法加载debugger,参数有问题。

一般问题为:

1、参数错误:地址或者端口与虚拟机不相对应。

 

 

 

2、debugger菜单选择错误,选择Linux debugger。

 

 

 

3、虚拟机中linux_server或者linux_server64未启动

4、虚拟机中linux_server或者linux_server64与物理机中的ida版本,不相对应,到ida目录下的dbgsrv文件中重新拷贝一次,再启动。

5、如果linux_server在docker中并出现:

docker中显示:

Accepting connection from xxxxx...

TRACEME: Operation not permitted[1] Closing connection from xxxx.xxxx.xxxx...

或者,ida中显示:由于目标计算机积极拒绝,无法连接。

 

 

 解决办法:

在运行docker容器时在命令中添加 --security-opt seccomp:unconfined 参数,关闭docker远程命令执行保护

docker run --security-opt seccomp:unconfined -it -p 23946:23946 ubuntu.17.04.i386_1 /bin/bash

 

 

 

posted @ 2019-12-02 20:30  一点涵  阅读(2423)  评论(0编辑  收藏  举报