<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ratikesh Mishra on Medium]]></title>
        <description><![CDATA[Stories by Ratikesh Mishra on Medium]]></description>
        <link>https://medium.com/@ratikeshmishra?source=rss-6ab0b86752a5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5fcXFWWI5AaJxSCY__k5ng.jpeg</url>
            <title>Stories by Ratikesh Mishra on Medium</title>
            <link>https://medium.com/@ratikeshmishra?source=rss-6ab0b86752a5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 17:02:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ratikeshmishra/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Malware & Botnets: Prevent your Wordpress getting hacked]]></title>
            <link>https://medium.com/flobiz-blog/malware-botnets-prevent-your-wordpress-getting-hacked-1b3448ab8a78?source=rss-6ab0b86752a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b3448ab8a78</guid>
            <category><![CDATA[botnet]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[product]]></category>
            <dc:creator><![CDATA[Ratikesh Mishra]]></dc:creator>
            <pubDate>Wed, 10 Jun 2020 16:45:03 GMT</pubDate>
            <atom:updated>2020-06-10T16:45:03.160Z</atom:updated>
            <content:encoded><![CDATA[<p>..</p><p>World is currently struggling to get out of chaos created due to a virus infecting human bodies and since long time similar chaos exists in the virtually connected world of Internet. These chaos are created in the connected system of internet through malware, viruses, ransomware, etc. which are programmed to infect the computers to retrieve critical information for devilish needs.</p><p>Recently, I faced similar chaos where one of my <a href="https://kinsta.com/knowledgebase/what-is-wordpress/">wordpress</a> website faced attack by botnets. Yes, you got it correct <a href="https://us.norton.com/internetsecurity-malware-what-is-a-botnet.html"><strong>botnets</strong></a><strong> </strong>were behind the attack, I know many of you might have heard of it in your cyber security lessons but never would have faced it practically.</p><blockquote>“Internet is a jungle filled with predators, one weak move can make you prey”</blockquote><p><strong>Why you should read this blog?</strong></p><p>In this blog, I will be sharing my experience that how I got rid of this attack and how these botnets infects the wordpress and many such websites panels through a malware (<strong>mwebp_64</strong> &amp; <strong>jmagik_64</strong>) and then uses the infected system to intrude into other systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8nrC211oKe1A6L2ilEQMg.png" /></figure><h3><strong>Decoding the attack</strong></h3><p>So let the thrill begin, I will be explaining how the attack pattern looks like what are the steps you can take to know whether this malware have infected your website manager. Since, my project used wordpress hence I will be explaining in reference of it.</p><p><strong>Steps to detect the attack</strong></p><ol><li>Check the resource of your system like network in/out and cpu usage which abnormally goes high if your system is infected, now a days this can be easily analysed in cloud providers console.</li><li>If resource usage is abnormally high, SSH into the system and run <strong><em>sudo netstat -peanut</em></strong> in order to check the foreign address for higher network out. If you see random IP’s getting hit on their port 80/443 that means your infected system has started intrusion attack on other such system.</li><li>Run the command <strong>ps -ef | grep stealth, </strong>if you see any process id associated with this stealth process take a note of it. Lets assume process id to be 7333.</li><li>Lastly go to <strong>/proc/7333/ </strong>and perform <strong>sudo ls -la exe </strong>to backtrack what is the binary running this process. If you see something like <strong>mwebp or jmagik</strong> as the binary name, then bingo your server is under attack.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oOKM7zpuidhd0M6WxK8CNA.jpeg" /></figure><p><strong>How did malware infected the system?</strong></p><p>In March 2020, high download of theme <strong>alternate-lite </strong>took place on various wordpress websites, reason for this was basically attackers installed these themes on wordpress website whose admin panel password were brute-forced successfully by them.</p><p>What went wrong in <strong>alternate-lite </strong>?</p><ol><li>In every theme which you choose has customiser.php in it with the help of which you can perform customisations in theme. These themes can be founded inside<strong> wp-content </strong>directory</li><li>The attackers managed to get rid of this theme and replaced the code of customiser.php with the code which helps in downloading the binaries. This replaced code is a script which downloads the binaries of malware (<strong>mwebp_64</strong> and <strong>jmagik_64</strong>) on specific path of your system with help of downloader. Below is how the code looks like:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efBNNBDDyr9Couf_az0wKg.png" /></figure><p>3. This script can be easily executed as all the content of <strong>wp-content </strong>folder is on discoverable<strong> </strong>path and can be accessed on http or https something like: <em>http://domain_name/wp-content/themes/alternate-lite/inc/customizer.php </em>hence attackers/bots executes this script on your domain and keep on abusing your system.</p><p><strong>How does the intrusion attack happens from infected system?</strong></p><p>Botnet system as mentioned and shown in diagram works in coordination with CNC servers or centralised server which is guiding the attack. Through chain of protocols the communication between the CNC and infected machine happens. This malicious communication between two machine is done with the help of malware. In above attack too, the following chain of protocol are followed:</p><ol><li>After infecting the machine <em>http://cnc/project/active</em> signal is sent to CNC to let him know that machine is infected.</li><li>Followed<em> by which CNC ask for machine architecture using http://cnc/bots/chkVersion?currVers=3.03\&amp;arch=linux</em></li><li>Then, CNC assign the role to infected machine which they have defined on their end like <strong>wpchk; wbrt;</strong> etc which signifies that whether brute force login needs to be done or admin panel needs to be searched by infected machine.</li><li>After the machine gets role, CNC sends the series of IP’s which needs to be intruded by the infected machine, infected machine performs the action according to the role assigned and hence intrusion attack starts with this chain of events.</li></ol><h3><strong>Big Question: How to rescue yourself</strong></h3><p>Definitely this attack is well structured attack by professional CNC servers and hence it needs to be dealt more professionally. Following are the steps you can take to get rid of it.</p><ol><li>First and foremost remove/delete the <strong>alternate-lite</strong> theme so that the on fly malware downloads can be prevented.</li><li>Kill all the stealth process running on your machine and get rid of it immediately.</li><li>Monitor your system well for abnormally high resource utilisations by setting alerts.</li><li>Locate all other files of wordpress which are infected in last 15–30 days and check that whether they contains genuine or malicious code.</li><li>Block all unnecessary outgoing and incoming ports which are barely used by your server.</li><li>Harden all your folders of wordpress which are exposed and rarely needed by you, namely <strong>wp-content, wp-includes, wp-admin, uploads etc. </strong>Hardening of rules can be done by configuring .htaccess file on root of these folders.</li><li>Check for all the core wordpress files for the malicious code and get rid of it.</li><li>Last but not the least change your admin password and keep it significantly strong so that it can’t be brute-forced.</li></ol><p>So, these are some steps which you can take to recover your machine from this attack and if you still think that there might be some backdoors try to setup the wordpress from scratch on another server by following all necessary security steps.</p><h3><strong>Conclusion</strong></h3><p>Network Security is most debatable topics these days, many institutions are suffering from ill effects of the network security and day-in and day-out fighting with it. While we are developing multiple new application we tends to forget security of our system, but I suggest that its time for developers to start thinking security on top of their mind before anything else. Internet is a open jungle and anytime your predators can attack you so be-aware and adopt SOP for security in your organisations.</p><p>PS: This attack helped me in uplifting my know how of linux system in more better way and practical way. ;)</p><p>For more such interesting computer science updates follow me on <a href="https://twitter.com/Oshivoham">Twitter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b3448ab8a78" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flobiz-blog/malware-botnets-prevent-your-wordpress-getting-hacked-1b3448ab8a78">Malware &amp; Botnets: Prevent your Wordpress getting hacked</a> was originally published in <a href="https://medium.com/flobiz-blog">FloBiz Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Scalable Architecture]]></title>
            <link>https://medium.com/koinex-crunch/building-scalable-architecture-85ea199aec67?source=rss-6ab0b86752a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/85ea199aec67</guid>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Ratikesh Mishra]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 12:27:10 GMT</pubDate>
            <atom:updated>2019-02-06T18:27:43.840Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rCUbfBg-CnW3PhCkZ-6R6Q.jpeg" /></figure><blockquote>“Architectural refactoring is hard, and we’re still ignorant of its full costs, but it isn’t impossible.” — Martin Fowler</blockquote><p>I recently read about LMAX Architecture written by the prolific author Martin Fowler. It was one of the most delightful and eye-opening experiences of my life as a programmer. There were many key takeaways from his work and I highly recommend it to anyone who wants to improve their thoughts on architectural design.</p><p><strong>The kick-start</strong></p><p>In fast-growing financial systems importance of clean and scalable architecture is important for better scalability and faster execution. LMAX architecture helped me in designing multiple real-time application at Koinex which were not significantly transactional.</p><p>Though it is not possible to summarise the entire architecture in depth, I am listing some key learnings that can improve the quality of the scalable architectures that we design for our products. Let’s get started!</p><p><strong>The Architecture</strong></p><p><strong>Components of Architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-k5NhhxSq_ZbRmal" /></figure><ul><li><strong>Input Disruptors</strong>: Responsible for I/O operations from the network, un-marshalling, replication and journaling.</li><li><strong>Output Disruptors</strong>: Helps in Marshalling messages and responses received after processing.</li><li><strong>Business Logic Processor</strong>: Handles all the business logic in the application.</li></ul><p><strong>How to Design a Business Logic Processor?</strong></p><p>Business Processor is the state machine of the events that are coming from the input disruptors. They help in processing the input and producing output.</p><p><strong>In-Memory Logic Processing</strong>: Processed data after reading from input disruptors should be stored in an in-memory data structures. This reduces latency in I/O operations performed by output disruptors. No database, no persistent store is required.</p><p><strong>Sequential Input Stream</strong>: Input read from the input disruptors must follow a sequential path, like, it should either be FIFO, LIFO or some other sequence.</p><p><strong>Clustered Business Processors</strong>: Since the system is heavily in-memory, hence input data stream should be fed into multiple business processors, so that if any of processor fails or is inconsistent then the traffic can be switched to the other working one. However, at any given point of time, only a single processor is linked to the output disruptor.</p><p><strong>Input Sourcing Database</strong>: The input stream events should be stored in the event system like Kafka, ActiveMQ which helps in recovery of the malfunctioned processor and mitigates the risk of system downtime.</p><p><strong>Better Programming Model:</strong> Better error handling and defining better interaction with external services asynchronously is the key programming model which one should follow while designing such real-time architecture.</p><p><strong>Key Points in designing Output and Input Disruptors</strong></p><p>Input and output disruptors work on wired messages and hence they are required to be stored in a durable manner and replicated as per the clustered business processors. Since the data is stored, replicated and consumed by the business processors independently, this results in a producer-consumer problem in the distributed system as a business processor should not read the data which is getting replicated.</p><p>For instance, if data replication fails and in meanwhile business processor processed the data then this will cause inconsistency across the clustered business processor as described above.</p><p><strong>Concurrent Data Structure to rescue</strong></p><p>Martin proposes the concept of ‘ring buffer’, a type of concurrent data structure. Ring Buffer is designed on the principle of shared sequence counters which are used by producers and consumers to handle concurrency. For your architecture, you can use or design any such concurrent data structure to deal with the producer-consumer problem.</p><p><strong>What is Concurrent Ring Buffer and how it works?</strong></p><p>Ring Buffer is the multicast network of queue data structure. It is referred as multicast network as whenever the producer puts an object all the consumer are notified for parallel consumption with the help of downstream queues.</p><p>Producer and Consumers both handles concurrency with the help of sequence counter. Every Producer writes its own sequence counter but before writing it reads all other sequence counters of consumers and producers in order to avoid parallel writes and preserve consistency. Sequence Counter can be considered as the locking variable. Similarly consumers also keeps watch on the sequence counter before consuming so as to ensure that they read consistent data.</p><p>In above scenario, Journaler, replicators and business logic processors act as consumers while unmarshaller act as producer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*Qob7cHoG_vWXNte9" /></figure><p><strong>Journaling</strong>: In order to recover the faulty business processor it is required to have the stored data events. Journaling helps in storing data from live streaming in-memory data to disk while preserving the sequence of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/0*mBlPfhPcIXO7P4Eh" /></figure><p><strong>Disaster Recovery</strong></p><p>While considering any architecture to its full usage we must also analyse how easily and speedily the system can recover from a disaster. The LMAX architecture helps us to mitigate risks due to its independent component which are clustered.</p><p><strong>What are the risks?</strong></p><ul><li>If the data on which business processors are running becomes corrupted due to communication issues with the input disruptors.</li><li>If journaling operation of the streamed data fails and affects replication of data.</li></ul><p><strong>Risk Mitigation using LMAX</strong></p><p>As mentioned above, Ring Buffer is a concurrent data structure which ensures mitigation of the risk of data corruption across business processors by solving the producer-consumer problem.</p><p>The running Business Processors are clustered and hence multiple processors are kept in sync with the input data in a way that if any business processor goes down, the other can be considered as the master with zero downtime.</p><p>The journal data helps in recovery of the corrupted processor by streaming the events that have been recorded and also replicates the situation which caused the failure of the processor.</p><p><strong>When should you use this architecture?</strong></p><p>Concluding the above points, you can use LMAX pattern in your architecture for designing scalable and fast system if:</p><ul><li>The traditional model of concurrent sessions surrounding a transactional database is becoming difficult to manage.</li><li>The business problem you are solving is not heavily transactional. With transactions that are more independent of each other, there’s less need to coordinate, so using separate processors running in parallel becomes more attractive.</li><li>The Backend systems are not interactive with the users and may use asynchronous communication and programming model as mentioned above.</li><li>You require good separation of concerns, allowing people to focus on Domain-Driven Design and also want to keep much of the platform complexity well separated.</li></ul><p><strong>PS</strong>: The Trade Engine at Koinex is designed using many principles that are mentioned above. This makes us capable of taking significant loads at peak times.</p><p><strong>Trade Engine at Koinex &amp; LMAX</strong></p><p>As mentioned earlier, LMAX architecture helped us in designing a stable and high throughput Trade Engine for Koinex. We implemented some principles of LMAX by developing our business processors in-memory, keeping the design concerns of input and output stream separate. However, we didn’t follow the fundamental of clustered business processors which restricted us from having zero downtime for the recovery process. Although the event streaming nature of the engine helped us to recover the system in a faster manner.</p><p>That’ll be it!</p><p>To be honest, it is going to take a lot of practice and many hours of coding to drill these principles in your subconscious. The more you read, the better you will learn. And yes, keep the practice always going.</p><p>Until next time, Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85ea199aec67" width="1" height="1" alt=""><hr><p><a href="https://medium.com/koinex-crunch/building-scalable-architecture-85ea199aec67">Building Scalable Architecture</a> was originally published in <a href="https://medium.com/koinex-crunch">Koinex Crunch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Right Mindset for Blockchain in Business]]></title>
            <link>https://medium.com/@ratikeshmishra/right-mindset-for-blockchain-in-business-6c7f6084bceb?source=rss-6ab0b86752a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c7f6084bceb</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[hyperledger]]></category>
            <dc:creator><![CDATA[Ratikesh Mishra]]></dc:creator>
            <pubDate>Sat, 11 Aug 2018 11:10:32 GMT</pubDate>
            <atom:updated>2018-08-11T15:20:49.867Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*z8mB1Z48N0BvPa_kRYrW2Q.png" /></figure><p>Being in the blockchain industry for an year now and reading closely about blockchain projects, I believe it as a revolution and idea of this article is to help people in developing a right mindset before using blockchain in business.</p><p>During my short conversation with <strong>CTO NSE (National Stock Exchange of India )</strong> I was convinced that how India’s business houses are looking blockchain as a technology to grow their business which helped me in finding crux of its usage. In<strong> financial budget 2018–2019</strong> the Indian government promoted blockchain as technology for startups and business but what I realised after my multiple conversations is that technology and business leaders in India are still confused with the concept of blockchain and mixes them with the cryptocurrencies and tokenisation.</p><p>Technology adds a dimension to our thinking in doing business and blockchain also has provided us with four basic fundamental dimensions on which new models of business can be developed. If we think our business on these individual components then we can easily plan out our best models. These dimension are as mentioned below:</p><p><strong>Immutability of Data:</strong></p><p>Data in current system is centralised and is residing on the data houses of central authorities. Over the period of time these data might be mutated and corrupted through individuals or technological changes which adds a clear concerns for industries like financial services and other such critical services.</p><p>If you think that the data which your business needs has to be <strong>immutable and secure</strong> then blockchain provides you with this dimension to think methods in <strong>securing data of </strong>your traditional systems.</p><p><strong>Tokenisation:</strong></p><p>Blockchain has the power to provide your business an opportunity to convert the critical information in form of token which can contain a chain of immutable data. Tokenisation should not be looked only as a digital money rather its a way of distributing stake by weightage of its utility.</p><p><strong>Dividing a land ownership</strong> in form of token will help you understand better that how a tokenisation economy can be used in your current traditional systems and how it can remove <strong>operational hazards</strong>.</p><p><strong>Unified View Of Information:</strong></p><p>In traditional system like <strong>bank and stock exchanges</strong> lots of information needs to be shared and multiple process of <strong>reconciliation</strong> happens in order to flag out the fraudulent activity in the network . To and fro communication of the data copies makes this process operationally difficult.</p><p>Distributed ledger helps in providing the unified view of the ledger across all the participants which reduces the cost of sharing the data and loosing it quality. If your business needs to have a unified view across multiple participants then blockchain adds this dimension too while you model your business.</p><p><strong>Algorithmic Consensus:</strong></p><p>Last but the most important dimension is the <strong>consensus</strong>. Its just like having a <strong>democratic view</strong> over the data copies present with owners of your business network. If you think that after data is written to your system it needs to be voted and proofed through various stake holders of your business then the algorithmic consensus is what you should look for as important dimension.</p><p>These above four component can individually be used to model your business ideas on blockchain depending on the complexity of system you think.</p><p>If you keep on confusing yourself by comparing and finding the usage of blockchain with traditional mindset then it would be hard for you to convince yourself and will end up in a dilemma that is really blockchain revolutionising the world ?</p><p><em>As rightly said by</em><strong><em>Dr. David Thornburg</em></strong></p><blockquote>“No matter how powerful the technology, if user doesn’t have the right mindset, nothing changes in classroom”</blockquote><p>Follow me on twitter and linked-in</p><p><a href="https://twitter.com/mhcoder_40">Ratikesh Mishra (@mhcoder_40) | Twitter</a></p><p><a href="http://www.linkedin.com/in/ratikeshmisra6">www.linkedin.com/in/ratikeshmisra6</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c7f6084bceb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>