Author Archives: Chok Leong

About Chok Leong

I am an Electrical and Electronics engineer.

What To Do If Your WordPress Site Is Infected By pub2srv.com Adware

This site was infected by adware between end of August 2017 and 26 October 2017.

What happened

I realized something was wrong when I visited my own site this morning and discovered that there were popup and redirection when I clicked on anywhere on the page.

The Evil Adware

The Evil Adware

Also, when I checked the analytics of the site, there were practically no visitors since the beginning of September 2017.

Zero Visitor Since September 2017

Practically Zero Visitor Since September 2017

Investigation

I run a test using pingdom tool (you can see the scan result by clicking the link) and confirmed that my WordPress site was being infected by adware.

Here are the findings:

pub2srv.com

pub2srv.com

mobisla.com

mobisla.com

deloton.com

deloton.com

Some unknown scripts were being injected into the site.

  • http://deloton.com/apu.php?zoneid=1063894
  • go.pub2srv.com
  • http://go.pushnative.com/notice.php?p=628268&interactive=1&pushup=1
  • go.mobisla.com

Root cause analysis

When I tried to scan my WordPress installation folders on the server for files that contain “pub2srv.com” keyword I found nothing.

The hacker is good at playing hide-and-seek.

With help from Google, it turned out that the malicious code was hidden in multiple files located in the <WordPress installation path>/wp-includes/ folder.

Here is the list of the infected files:

  • wp-feed.php: contains a list of IP addresses
  • wp-vcd.php: contains a compressed malicious installation program
  • class.wp.php: contains SQL injections and cross-site scripting
  • post.php: contains the reference to wp-vcd.php

Here is the sample content of class.wp.php:

The above code is adding/injecting user to the database.

It is also loading content from http://www.aotson.com/codexc.txt which contains the following instructions:

The hacker is able to target specific infected site by changing the path remotely via http://www.aotson.com/codexc.txt Pretty clever and super evil.

It is capable of spreading itself to all the WordPress sites across different domain names that are hosted under my user account.

More detail can be found here: wp-vcd.php malware analysis.

Lesson learnt

It is clear that the root cause was due to me installing untrusted WordPress themes on my site.

The infection occurred at an earlier date than mid-August based on the evidence from the backup that I have.

However, the symptom of unusual slowness and trouble only appeared towards the end of August.

Solution

Here is an article on how to remove pub2srv malware to learn more about the adware/malware.

Here is the detail of other people who were also facing the same issue.

I installed the Anti-Malware Security and Brute-Force Firewall plugin and run a scan. 254 files, which were affected, were removed after the scan.

I updated the my WordPress theme to the latest version.

I reinstalled the WordPress version 4.8.2.

I also updated the login password.

I also updated the server user login password just in case.

Final thought

Maintaining a website is similar to maintaining my health. I need to monitor it regularly to avoid temporary death from happening again.

The site is as good as dead for the past two months.

I realized that cyber risk is a real threat that could impact a lot of people. Infected site is capable of spreading virus to innocent visitors and might cause serious damage to them.

It is important to keep the information systems secured so that I will never encounter similar incident again. Here is a self-study guide CISSP (ISC)2 Certified Information Systems Security Professional Official Study Guide that contains information on how to maintain security in a world that is surround with cyber risks. Grab a copy if you are interested.





2017 The Market Capitalization of World’s Stock Markets

The data in this post is extracted from Pocket World in Figures 2018. It contains economic data that provides insights towards understanding the world better. Grab a copy if you are interested.

Here is a list of world largest stock markets ranked according to market capitalization.

MarketEnd 2015 ($bn)End 2016 ($bn)Diff (%)
NYSE177871957310.04%
Nasdaq - US728177796.84%
Japan Exchange Group489550623.41%
Shanghai SE45494104-9.78%
London SE Group38793496-9.87%
Shenzhen SE36393217-11.60%
Euronext330634935.66%
Hong Kong Exchanges318531930.25%
Deutsche Börse171617320.93%
TMX Group1592204228.27%
SIX Swiss Exchange15191415-6.85%
BSE India151615612.97%
National Stock Exchange of India148515343.30%
NASDAQ OMX Nordic Exchange12681260-0.63%
Korea Exchange123112824.14%
Australian Securities Exchange1187131710.95%
BME Spanish Exchanges787711-9.66%
Taiwan SE Corp.74586215.70%
Johannesburg SE73695930.30%
Singapore Exchange6406491.41%
BM&F BOVESPA49177457.64%
Saudi SE - Tadawul4214496.65%
Mexican Exchange402334-16.92%
Moscow Exchange39362258.27%
Bursa Malaysia383363-5.22%
Indonesia SE35343422.95%
Stock Exchange of Thailand34943725.21%
Tel-Aviv SE244215-11.89%
Philippine SE2392400.42%
Oslo Bors19423420.62%
Santiago SE19021211.58%
Borsa Istanbul189158-16.40%
Qatar SE1431558.39%
Warsaw SE1381412.17%
Irish SE128121-5.47%
Abu Dhabi Securities Exchange1121218.04%
Wiener Börse961015.21%
Tehran SE8910113.48%
Colombia SE8610319.77%
Dubai Financial Market84-NA
Total6766770556

Interesting observations

The total market cap for Taiwan Stock Exchange is USD 862 Billion (end of 2016) which is roughly equal to the market cap of Apple (APPL, USD 847 Billion as of 1st of September 2017).

The total market cap for Singapore Exchange is USD 649 Billion (end of 2016) which is roughly equal to the market cap of Alphabet (GOOGL, USD 659 Billion as of 1st of September 2017).

The total market cap for Bursa Malaysia is USD 363 Billion (end of 2016) which is roughly equal to the market cap of Johnson & Johnson (JNJ, USD 351 Billion as of 1st of September 2017).

Final thoughts

Imagine a whole country’s stock market value is represented by a single company. This is incredible but true.

Investing in a single country is similar to investing in a single company. For example, buying stocks in Bursa is like buying Johnson & Johnson (JNJ) stock.

The Bursa Malaysia ONLY represents about 0.51 % (363/70556=0.00514) of the total market capitalization of world top 40 largest stock markets. It is a small fish in a big ocean.

Low Hanging Fruits

Low Hanging Fruit is Luck in Disguise

Low hanging fruit is tasty. It is actually tastier than the one hanging higher on the same tree.

Fruits can grow on any branch of a tree. Usually, the fruit quality is distributed evenly all over a tree (e.g.: rambutan). However, based on the position or altitude of the fruits, some are easier to reach than others. This is because fruit tree can sometimes grow really tall like a skyscraper.

Those within arm reach are easier to harvest than those hanging high at the top of the tree. Therefore, the cost of harvesting is higher for the higher hanging fruits. Not to mention that the risk of injury is also higher if there were accident when climbing the tree.

When the fruit quality is about the same, I prefer the low hanging fruit over high hanging fruit. It is tastier because the effort spent in harvesting is lesser. When there are enough low hanging fruits, I can safely ignore the high hanging ones.

Low hanging fruit is luck in disguise

Life is uncertain because it is complicated and governed by randomness. I spent a lot of time thinking about luck and randomness in life. And I find two factors that have great influence on luck:

  • Initial condition
  • Amount of accumulated resources

Factor one: initial condition

Where you started matters. Some places will have more resources than others. For instance, some places have gold mines and some others have oil. Some are deserts.

Initial condition even determines how successful a person can be. I read the following example from an article.

Imagine two equally capable graduates looking to become a professor at a highly reputable university. However, the university only has one spot available. Since both graduates are equally qualified, one of them will be chosen while the other need to look else where for work (e.g.: at a lower rank university).

The graduate who becomes a professor at the highly reputable university has greater access to resources: better students therefore lesser work at teaching, better tools and equipments for research therefore more productive and more academic papers are published and becomes more well-known in the academic circle.

The other graduate who becomes a professor at a lower rank university need to work and teach harder since the university has looser criteria for selecting students. The professor is also less productive due to lack of resources and time for research.

In the end, one professor is judged as extremely successful while the other not so due to the initial distribution.

In a poker game, just like in the game of life, people are being dealt with different cards. Those cards determine the initial condition.

Where the fruits are being distributed over a tree is the initial condition. Where you are located is also the initial condition.

Factor two: amount of accumulated resources

Different initial conditions put different people into power. CEO has great access to company’s resources and therefore power to change the environment the way she likes.

No matter where you started, you can accumulate resources that are available to you by focusing on the low hanging fruits. You can collect as much low hanging fruits as possible that are accessible to you. By the time you accumulated enough resources, you can create your own luck.

Having resources allows you to change your environment. In other words, the more resources you have, the luckier you get. I can even go as far as claiming that how much resources you have is a measure of how much luck you get.

Luck is proportional to the amount of resources that you have.

Low hanging fruit is luck in disguise.

Harvesting low hanging fruits is an optimal strategy to maximising wealth

Something that you had tried very hard to obtain can cost a lot. Trying too hard is not the right thing to do given that you have limited resources.

The point of low hanging fruit strategy is not to try too hard but to identify your low hanging fruit as not to waste it: the low hanging fruit that is available uniquely to you given your initial condition.

Low hanging fruit is available for you and is what you can easily reach for. It is your advantage. It is what money cannot buy. It is your edge.

Everyone is in his/her own unique position in space and time to exploit his/her low hanging fruit available to him/her.

Harvesting low hanging fruits significantly reduces risk of failure. It is robust. It gives margin of safety as in providing high return with low risk.

In computer science’s term, low hanging fruit has low computational cost. It is something that is easy to do.

When there is too much to do, pick the easiest tasks with the highest payoff. Over time, you will accumulate much more resources this way.

Overall, we have done better by avoiding dragons than by slaying them. – Warren Buffett

Do what you do best and is the easiest to you

I don’t look to jump over 7-foot bars: I look around for 1-foot bars that I can step over. – Warren Buffett

When you are a giant, you can easily walk over a 1-foot bar. You can even help others to cross the 1-foot bar. It is harder when you encounter a 7-foot bar. In this case, you need other giants to help.

Everyone is unique and has different strength. Some might be a giant in one domain but weak in others as illustrated in table below.

Person/Domain Domain A Domain B
Person 1 Giant Dwarf
Person 2 Dwarf Giant

If I have seen further than others, it is by standing upon the shoulders of giants. – Isaac Newton

Do what you do best as you are already a giant in your domain. You can easily cross as many 1-foot bars as possible in your domains.

The 1-foot bars are your low hanging fruits.

Over time, you have gone a long way and collected more resources and you might be able to grow and become a giant in other domains. The condition will change, just as the initial condition changes at different point in time and space.

Look for the obvious things. Things that are obvious to you may not be obvious to others. You can see opportunities where others don’t.

Be the best in your domain is rewarding.

The will always be low hanging fruits

In the stock market, whenever there is someone saying the market is overvalued, other will point out that he/she is still able to find undervalued stocks and profit from them.

Exceptions are everywhere. Exceptions are part of our life. It is part of the rule. There will always be exceptions as there are outliers in a normal distribution.

Outlier

Outlier

The market is big. You will get different conclusion based on how you approach your search and also based on your initial condition.

Peter Lynch’s famous advice is to buy what you know. This can be translated into grab your low hanging fruit relative to you.

Warren Buffett has been harvesting low hanging fruits for his lifetime with unbreakable investment record.

Exceptions are low hanging fruits in disguise. Find your exceptions. Your initial condition may put you at exceptions.

Exceptions are few and rare

There will not be many exceptions. They will not be available all the time. But it is better to have one exceptionally good idea from time to time than to have 100 average ideas all at the same time. The former is much more enjoyable while the latter is overwhelming.

That is the beauty of exceptions. That is why low hanging fruit is tastier.

Final thought

You will find something as long as you are searching. Low hanging fruits are everywhere.

Exception is part of the rule. Whenever other says there is no hope, you know better.

Explore and exploit low hanging fruits. It is your best bet. It provides a framework for optimal decision making for maximising the use of resources.

The best thing in life is free. The second best thing is cheap. The worst thing is expensive. Low hanging fruit is cheap and sometimes it is free. Look for free things.

Hunt for low hanging fruits. The world is your playground.