I've reviewed hundreds of Dockerfiles across startups and enterprises.
The same 10 mistakes show up everywhere:
- Using latest tag
- Bloated images (2GB for a 50MB app)
- Killing build cache with wrong layer order
- Running containers as root
- Hardcoding secrets in Dockerfiles
- No .dockerignore file
- Missing health checks
- Same Dockerfile for dev and prod
- Inefficient layer stacking
- Never updating base images
None of these are complicated to fix.
But most teams never revisit their Dockerfiles after the initial "it works" moment.
I wrote a full breakdown with code examples and fixes for each one
"FUD" Backoored SortaAI installer leading to Lumma
C2: 45.32.147.46, 82.197.67.174, google calendar
EV Signer: ICEL LOGISTICS COMPANY LIMITED (GlobalSign)
So here goes my journey of Brute Ratel...I usually never talk about it because it wasn't pleasant but over the past two years I was finally able to make peace with it. Here goes my roller coaster ride...
I completed my graduation in accounting in 2013 but could not clear my CFA exam and thus I was not able to get a job. I started reading up books on CCNA as I always loved computers, but having no support from family, I started working at a call center from 2013 to 2015. The pay scale was as bad as it could get. I however quit in 2015, and started searching for IT jobs after saving a little bit of salary.
But people with engineering degrees couldn't find a job in IT, let alone me. After one year of being jobless, I finally got a half-decent job as a trainer in 2016 in Network Intelligence. Being Mumbai, the pay was just 25k INR a month.
Same year 2016, I was learning Elasticsearch and Kibana, and we got an IR case for a large bank. My director wanted to see how we can utilize big data analytics for log analysis and luckily, the only 3 people with the Elasticsearch knowledge were me, my manager and my director. I was called on to this case to help with my knowledge in ES and what came next was something I never expected.
My director was able to jot down the malware behavior from the system logs. I was of no use apart from just setting up ES. I started reading up on how malware reversing was done and realized I am ages behind in dealing with anything so mature which targeted a SWIFT network. I spent my days just trying to understand basic metadata extraction from an exe/dll. The project was over within a month, and I realized I was into an industry where I didn't know the difference between a hand and a leg. I spent the next one year reading up a lot of books on windows internals.
Fast forward 2017, I decided to certify for OSCP. I spent around 10 hours on a daily basis, apart from my 9 hours of daily work, doing HTB before going in for the labs and was able to successfully complete my exam in 5 hours. I realized how C/C++/Asm programming is still relevant unlike what people in this industry say.
I had a new sense of pride as I completed the exam in a few hours but little did I know that it mattered as much as a freckle on the end of my nose. I started reading up various books on programming, research papers by kaspersky on carbanak, locky, wannacry trying to improve my understanding of windows internals. With this knowledge I started building my own C2 in 2018 which I used in red teams and internal PT. However, one thing I was constantly asked was who would use your C2, if there is already Cobaltstrike and Metasploit which did a job better. In India appsec mattered more than anything else.
In 2019 during one of my RT engagements for a large bank in Dubai where I was doing a physical breach, I successfully breached the bank perimeter and was able to access the server room on the 20th floor by cloning cards with proxmark. The client being extremely happy, offered me a job over there, wherein I started questioning myself why I am not looking out elsewhere. I started applying at various places out of which one was Mandiant. I cleared the interview and was informed my joining would be on April 2019. Working at an organization like Mandiant was a dream come true, which only lasted till the day I started working there.
2 days prior to joining mandiant, I posted a tweet that I was building a C2 in C#. Few hours into the tweet and I get a call from my soon to be manager in Mandiant, that I would get terminated before I even joined for posting something like this. A similar thing happened once I joined, wherein I was informed to stop building the C2, and focus on what 'leadership' wants. Being scared that I would lose my job which was my only bread and butter, I decided to stop the building it altogether. Although I did some great red teams over here, the management was extremely toxic. Before I could think of leaving the job, Covid happened in 2020.
Being not able to get out due to lockdown, I started writing my C2 again, but this time decided not to post anything on twitter. I continued building my C2 in a shitty laggy 11 inch laptop with 8 gigs of ram and 2 core CPU, for like 8 hours a day apart from working for 9 hours remotely. Somehow building the C2 was a getaway from all the covid shitshow alongside the toxic leadership I was working with. Getting around 4-5 hours of sleep per day, I started loving C and Assembly. Programming and reversing became an important part of my day to day activity. I used to wait for my reporting and calls to be over, just to get back to my personal laptop to continue coding.
Finally gave my interview in Microsoft in 2020 and got rejected because the HR said I don't have a computer science degree. I decided fuck microsoft, fuck certifications and fuck degrees. I made it my aim that I will switch jobs only on the basis of skills and nothing else. Late 2020, I cleared my interview in Crowdstrike and decided to quit Mandiant.
Post resignation, I spent one sleepless month rewriting my entire C2 in Go and C. I also signed an agreement with Crowdstrike that my C2 will be my IP, which apparently no one seemed to care about coz it's just another employee writing code right? Little did they know how this was going to backfire. I had to give my C2 a name, but wasn't sure what to put it on papers. I used to watch a lot of honey badger videos due to its nature and thus came the name Brute Ratel (anime :)). One day on a call my friend @Nikhith_ trolled around that its a C4 and not a C2 being 'Chetan's Customizable Command and Control'. Little did I know this name was going to stick around. Another friend @ScarredMonk helped me design the logo of BRc4. Having no idea on how a business works, I just put up my BRc4 for sale so as to mark my presence on the web and luckily I got a lot of requests. Had to consult a lot of lawyers before going ahead, because I did not want to be another Marcus Hutchins who sold malware to random companies and individuals.
Post my first sale of BRc4 in January, I was asked by a company to provide training on the product. This is when I started providing workshops on MOS, RTOS and OTD. I also decided to take a part time job at HackTheBox to build educational labs for them. Apparently, I was working 4 jobs at a time- CS in the morning, BRc4 at night, HTB and trainings on weekends. Recognizing the popularity of BRc4, CS asked me to stop selling it as it was against their policy.
I informed them that I wrote this in my agreement with CS during my joining. However, I was given an option to either let CS take over BRc4 for a considerable price or I would have to quit. Make no mistake, CS is a great place to work and the team and my managers over there were pretty awesome. But leadership does what leadership wants. So I decided it was about time to put down my papers. I gave my interview at Google and a few other places before quitting, wherein I cleared the interview. But I realized that I've come a long way from not having a job due to having a worthless degree, to having offers for large organizations. Thus, I decided that I would part ways, and see where BRc4 takes me.
Fast forward present day, I recall a line that my manager in NII @washalsec told me, that I have a lot of pride on my skills, but humility goes a long way. Something which I lacked a lot earlier, but realized its importance in the last two years for reasons you know why :). My aim towards posting this was to let people know that it doesn't matter what others tell you that you can or cannot do. I didn't know shit and I had a pretty big ego to never ask help from anyone, thus I had zero references even when I was looking out for a job. One thing I learnt over the period of years is that no matter how bad the situation gets, if you are persistent to find a solution, you will. The world is full of such people who want you to work in their ways. But in the end, its you who has to decide what you have to do. Yes, you might face problems along the way, and life is not easy at times, but being persistent and continuously working towards improving yourself should be the only goal. Because in the end, if you love what you do, you will always find a way to fix most if not all problems. :)
New Video "Reverse Engineering Mixed Mode Assemblies (#IDA, #DnSpyEx)" is out 💙😊🙏
Covering:
- Mixed Mode Assembly in General
- Static Analysis in IDA and DnSpyEx
- Dynamic Analysis - combination of IDA and dnSpyEx and debug controlling between them
https://t.co/bwbl6c7bfz
https://t.co/3PDQDSnFdM
🥳🥳My first vulnerability analysis on existing CLFS bug.
This is just my thought or understanding on how does the "malware" sample to carry out the exploit.
This blog post sums up my yearlong Windows Drivers research, detailing my own methodology for reverse engineering drivers, finding possible vulnerabilities, and understanding their exploitability: https://t.co/iPJGGlDnzB