You are not logged in.

#1 2014-01-09 16:56:22

botika
Member
Registered: 2013-07-12
Posts: 34

[SOLVED]ps not found, and path is ok have I a rootkit?

Hi!
Often use ps aux, but yesterday remanded me ps not found, I've been looking and I have found that saying that goes some thinking of reformatting or others others who if use much  the ps happens. shocked!?!? No joke, This is in stack overflow,  saying that these issues had to superusers big_smile
The rkhunter returns me these warnings

    Checking for prerequisites                               [ Warning ]
    /usr/bin/ldd                                             [ Warning ]
    /usr/bin/vendor_perl/GET                                 [ Warning ]
    Checking for passwd file changes                         [ Warning ]
    Checking if SSH root access is allowed                   [ Warning ]
    Checking if SSH protocol v1 is allowed                   [ Warning ]
    Checking for running syslog daemon                       [ Warning ]
    Checking for hidden files and directories                [ Warning ]

Iptables, enp4s0 not connected to internet only local network. and transmission, nfs and avahi not in use but sometimes I need it and as it is only local ...

Chain INPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
2200K  147M ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
  251 15628 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  enp4s0 *       0.0.0.0/0            0.0.0.0/0           
 1210 92492 logdrop    all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate INVALID
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8 ctstate NEW
 1238  107K UDP        udp  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate NEW
    0     0 TCP        tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp flags:0x17/0x02 ctstate NEW
 1368  109K logreject  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8 limit: avg 30/min burst 8
    0     0 DROP       icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8
    0     0 REJECT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            recent: SET name: TCP-PORTSCAN side: source mask: 255.255.255.255 reject-with tcp-reset
    0     0 REJECT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            recent: SET name: UDP-PORTSCAN side: source mask: 255.255.255.255 reject-with icmp-port-unreachable
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-proto-unreachable

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 4480K packets, 6106M bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain TCP (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 REJECT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            recent: UPDATE seconds: 60 name: TCP-PORTSCAN side: source mask: 255.255.255.255 reject-with tcp-reset
    0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0            tcp dpt:111
    0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0            tcp dpt:2049
    0     0 ACCEPT     tcp  --  *      *       192.168.0.0/24       0.0.0.0/0            tcp dpt:20048
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:57372

Chain UDP (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 REJECT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            recent: UPDATE seconds: 60 name: UDP-PORTSCAN side: source mask: 255.255.255.255 reject-with icmp-port-unreachable
    0     0 ACCEPT     udp  --  *      *       192.168.0.0/24       0.0.0.0/0            udp dpt:111
    0     0 ACCEPT     udp  --  *      *       192.168.0.0/24       0.0.0.0/0            udp dpt:2049
    0     0 ACCEPT     udp  --  *      *       192.168.0.0/24       0.0.0.0/0            udp dpt:20048
   44  6116 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:57372
    0     0 ACCEPT     udp  --  *      *       192.168.0.0/24       0.0.0.0/0            udp dpt:5353

Chain logdrop (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  380 30618 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            limit: avg 5/min burst 10 LOG flags 0 level 4 prefix "IPTables dropped: "
 1210 92492 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain logreject (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  491 39302 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            limit: avg 5/min burst 10 LOG flags 0 level 4 prefix "IPTables rejected: "
 1194  101K REJECT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable
    2  3000 REJECT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with tcp-reset
  172  5160 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-proto-unreachable

And systemctl list-unit-files

cronie.service                             enabled 
dhcpcd.service                             enabled 
display-manager.service                    enabled 
getty@.service                             enabled 
iptables.service                           enabled 
netctl.service                             enabled 
nfsd.service                               enabled 
rpc-idmapd.service                         enabled 
rpc-mountd.service                         enabled 
slim.service                               enabled 
tmux@.service                              enabled 
transmission.service                       enabled 
remote-fs.target                           enabled 

but ps returned without doing anything also need to format
My question is: this is a rootkit? And as you can be having this configuration? How can improve my safety?
regards

Last edited by botika (2014-01-09 21:54:53)

Offline

#2 2014-01-09 17:03:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]ps not found, and path is ok have I a rootkit?

Do you have procps-ng installed?

Offline

#3 2014-01-09 17:06:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: [SOLVED]ps not found, and path is ok have I a rootkit?

My hunch is that you have taken a pretty large leap here.

As a sanity check, what are the output of:
alias
which ps
and
file $(which ps)
??
If that last command (file) does not work, run file on the full path to the file you say is ps.  You might also post your full path ( echo $PATH )


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2014-01-09 18:40:36

botika
Member
Registered: 2013-07-12
Posts: 34

Re: [SOLVED]ps not found, and path is ok have I a rootkit?

alias

alias ..='cd ..'
alias :Q=' exit'
alias :q=' exit'
alias :x=' exit'
alias cd..='cd ..'
alias chgrp='chgrp --preserve-root'
alias chmod='chmod --preserve-root'
alias chown='chown --preserve-root'
alias cls=' echo -ne "\033c"'
alias cp='cp -i'
alias da='date "+%A, %B %d, %Y [%T]"'
alias doc='xdg-open'
alias du1='du --max-depth=1'
alias firewall='iptlist'
alias gem='export GEM_HOME='\''/home/pcare/.gem/ruby/2.0.0'\'' && gem'
alias gem-1.9='export GEM_HOME='\''/home/pcare/.gem/ruby/1.9.1'\'' && gem-1.9'
alias grep='grep --color=auto'
alias halt='sudo systemctl poweroff'
alias hist='history | grep'
alias ipt='sudo /sbin/iptables'
alias iptlist='sudo /sbin/iptables -L -n -v --line-numbers | column -t'
alias iptlistfw='sudo /sbin/iptables -L FORWARD -n -v --line-numbers | column -t'
alias iptlistin='sudo /sbin/iptables -L INPUT -n -v --line-numbers | column -t'
alias iptlistout='sudo /sbin/iptables -L OUTPUT -n -v --line-numbers | column -t'
alias iptlisttcp='sudo /sbin/iptables -L TCP -n -v --line-numbers | column -t'
alias iptlistudp='sudo /sbin/iptables -L UDP -n -v --line-numbers | column -t'
alias la='ll -A'
alias listd='find /etc/systemd/system -mindepth 1 -type d | xargs ls -l --color'
alias ll='ls -l'
alias lm='la | more'
alias ln='ln -i'
alias lr='ls -R'
alias ls='ls -hF --color=auto'
alias lt='ll -rt'
alias lx='ll -BX'
alias lz='ll -rS'
alias mv='mv -i'
alias netctl='sudo netctl'
alias openports='ss --all --numeric --processes --ipv4 --ipv6'
alias pac='/usr/bin/yaourt -S'
alias pacc='sudo /usr/bin/yaourt -Scc'
alias pacexpl='/usr/bin/yaourt -D --asexp'
alias paci='/usr/bin/yaourt -Si'
alias pacimpl='/usr/bin/yaourt -D --asdep'
alias paclf='/u	sr/bin/yaourt -Ql'
alias paclo='/usr/bin/yaourt -Qdt'
alias pacq='/usr/bin/pacman -Qs'
alias pacr='sudo /usr/bin/yaourt -Rs'
alias pacrf='sudo /usr/bin/pacman -Rscsn'
alias pacro='/usr/bin/pacman -Qtdq > /dev/null && sudo /usr/bin/pacman -Rs $(/usr/bin/pacman -Qtdq | sed -e '\'':a;N;;s/\n/ /g'\'')'
alias pacs='/usr/bin/pacman -Ss'
alias pacsa='/usr/bin/yaourt -Ss'
alias pacu='/usr/bin/yaourt -Syua'
alias pgg='ps -Af | grep'
alias ports='sudo netstat -tulanp | column -t'
alias reboot='sudo systemctl reboot'
alias rm='rm -I --preserve-root'
alias root='sudo -s'
alias scat='sudo cat'
alias scp='sudo cp'
alias smv='sudo mv'
alias srm='sudo rm'
alias sudo='sudo '
alias svi='sudoedit'
alias t3='sudo systemctl isolate multi-user.target'
alias t5='sudo systemctl isolate graphical.target'
alias wifi='sudo wifi-menu'

which ps

/usr/bin/ps

file $(which ps)

/usr/bin/ps: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=d861e03566317829beeeecc7e9769de7eac35298, stripped

echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/usr/bin/vendor_perl:/usr/bin/core_perl

pacman -Qs procps-ng

local/procps-ng 3.3.9-1 (base)
    Utilities for monitoring your system and its processes
ewaller wrote:

My hunch is that you have taken a pretty large leap here.

Hopefully you're right, Anyway, my system is safe? I followed all safety guidelines, the principles recommended, minimum permissions, etc.
Thanks for quickly answer

Last edited by botika (2014-01-09 18:53:19)

Offline

#5 2014-01-09 18:59:00

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: [SOLVED]ps not found, and path is ok have I a rootkit?

I found the reading of your alias assignments to be fascinating.  I might just steal some of those smile

The SHA1 of your /usr/bin/ps is the same as mine.  Mine works.  At least that means your file has not been compromised, unless it is a very clever rootkit.
I do not see an alias blocking it.
I assume you have tried running ps by providing the explicit path.

So, have you checked that the file attributes are executable, and that you are in a group that has executable rights on that file?
Is there any chance that the file exists on a file system that is mounted with the noexec flag? (check the output of mount )


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#6 2014-01-09 19:02:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]ps not found, and path is ok have I a rootkit?

ewaller wrote:

I found the reading of your alias assignments to be fascinating.  I might just steal some of those smile

I knew you had an ulterior motive in mind ;P
'type ps' should be enough to see if it's an alias:

$ type w
w is aliased to `wget -c --limit-rate=200K'
$ type ps
ps is hashed (/usr/bin/ps)

Offline

#7 2014-01-09 19:16:45

botika
Member
Registered: 2013-07-12
Posts: 34

Re: [SOLVED]ps not found, and path is ok have I a rootkit?

Might you look at,

/usr/bin/ldd: Bourne-Again shell script, ASCII text executable

I love to go to your town to discuss these issues big_smile In Pasadena I see the same Sheldown lol
I forgot to mention I'm in the testing repository.
And I'm really grateful to the work they do.
I'm very suspicious and I have a good backup and several projects that do not want to compromise, surely format. Setting as solved, but if you want to leave more recommendations are welcome.
Regard

Last edited by botika (2014-01-09 19:18:35)

Offline

#8 2014-01-12 21:27:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]ps not found, and path is ok have I a rootkit?

I'm kinda confused, why is this thread marked as solved? Do you know what happened and how did you fix the issue with ps etc.?

Offline

#9 2014-01-12 21:32:50

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED]ps not found, and path is ok have I a rootkit?

karol wrote:

I'm kinda confused, why is this thread marked as solved? Do you know what happened and how did you fix the issue with ps etc.?

He didn't really solve the issue. From

botika wrote:

I have a good backup and several projects that do not want to compromise, surely format.

I understand that he reinstalled Arch.

Offline

Board footer

Powered by FluxBB