Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "mongolia"
-
To all Juniors here(myself included):
If you ever feel discouraged just remember that a few thousand irrelavant mongolian horse nomads managed to conquer half of the known world in less than a hundred years, destroying countless empires and cultures far more sophisticated than their own using nothing but their wits and their brutal willpower.
If they could build a realm from Korea to Poland usibg horses, you can build some software using keyboards.10 -
So, some time ago, I was working for a complete puckered anus of a cosmetics company on their ecommerce product. Won't name names, but they're shitty and known for MLM. If you're clever, go you ;)
Anyways, over the course of years they brought in a competent firm to implement their service layer. I'd even worked with them in the past and it was designed to handle a frankly ridiculous-scale load. After they got the 1.0 released, the manager was replaced with some absolutely talentless, chauvinist cuntrag from a phone company that is well known for having 99% indian devs and not being able to heard now. He of course brought in his number two, worked on making life miserable and running everyone on the team off; inside of a year the entire team was ex-said-phone-company.
Watching the decay of this product was a sheer joy. They cratered the database numerous times during peak-load periods, caused $20M in redis-cluster cost overrun, ended up submitting hundreds of erroneous and duplicate orders, and mailed almost $40K worth of product to a random guy in outer mongolia who is , we can only hope, now enjoying his new life as an instagram influencer. They even terminally broke the automatic metadata, and hired THIRTY PEOPLE to sit there and do nothing but edit swagger. And it was still both wrong and unusable.
Over the course of two years, I ended up rewriting large portions of their infra surrounding the centralized service cancer to do things like, "implement security," as well as cut memory usage and runtimes down by quite literally 100x in the worst cases.
It was during this time I discovered a rather critical flaw. This is the story of what, how and how can you fucking even be that stupid. The issue relates to users and their reports and their ability to order.
I first found this issue looking at some erroneous data for a low value order and went, "There's no fucking way, they're fucking stupid, but this is borderline criminal." It was easy to miss, but someone in a top down reporting chain had submitted an order for someone else in a different org. Shouldn't be possible, but here was that order staring me in the face.
So I set to work seeing if we'd pwned ourselves as an org. I spend a few hours poring over logs from the log service and dynatrace trying to recreate what happened. I first tested to see if I could get a user, not something that was usually done because auth identity was pervasive. I discover the users are INCREMENTAL int values they used for ids in the database when requesting from the API, so naturally I have a full list of users and their title and relative position, as well as reports and descendants in about 10 minutes.
I try the happy path of setting values for random, known payment methods and org structures similar to the impossible order, and submitting as a normal user, no dice. Several more tries and I'm confident this isn't the vector.
Exhausting that option, I look at the protocol for a type of order in the system that allowed higher level people to impersonate people below them and use their own payment info for descendant report orders. I see that all of the data for this transaction is stored in a cookie. Few tests later, I discover the UI has no forgery checks, hashing, etc, and just fucking trusts whatever is present in that cookie.
An hour of tweaking later, I'm impersonating a director as a bottom rung employee. Score. So I fill a cart with a bunch of test items and proceed to checkout. There, in all its glory are the director's payment options. I select one and am presented with:
"please reenter card number to validate."
Bupkiss. Dead end.
OR SO YOU WOULD THINK.
One unimportant detail I noticed during my log investigations that the shit slinging GUI monkeys who butchered the system didn't was, on a failed attempt to submit payment in the DB, the logs were filled with messages like:
"Failed to submit order for [userid] with credit card id [id], number [FULL CREDIT CARD NUMBER]"
One submit click later and the user's credit card number drops into lnav like a gatcha prize. I dutifully rerun the checkout and got an email send notification in the logs for successful transfer to fulfillment. Order placed. Some continued experimentation later and the truth is evident:
With an authenticated user or any privilege, you could place any order, as anyone, using anyon's payment methods and have it sent anywhere.
So naturally, I pack the crucifixion-worthy body of evidence up and walk it into the IT director's office. I show him the defect, and he turns sheet fucking white. He knows there's no recovering from it, and there's no way his shitstick service team can handle fixing it. Somewhere in his tiny little grinchly manager's heart he knew they'd caused it, and he was to blame for being a shit captain to the SS Failboat. He replies quietly, "You will never speak of this to anyone, fix this discretely." Straight up hitler's bunker meme rage.13 -
Yay, my sister is going to Mongolia next week from Infosys as a project lead in Finacle. (a banking product)7
-
!Dev
So Malaysia also famous for police brutality against the non Muslim or non Malays. I recently tweet about the more cases of police brutality will increase day by day. A Malay man replied it is a part of duty of the police to do so. This really confused me. The last time I checked we as a citizens have the right to sue the police if they brutally force us to do anything. And also last time I checked the policemen in my country, just raped a Mongolian girl who is underage and the high court let them go freely. The Malay man replied to me that quite "YOU ARE OUT OF CONTEXT! GO BACK TO CHINA!" Well personally, my ancestors weren't from China , I will go back to Mongolia if I have a choice.13 -
!Dev
In Malaysia for some reason Chinese and Indians are considered as outsider. Some Malays are considering themselves are native (actually the Orang Asli are the native). Many politicians attempt to even startled a racial fight against the non- Malays. My country is operated by a closed system. Most Dutch , US companies are leaving Malaysia due to the unfairness.
Before this I worked in a Dutch company in Malaysia , where lately the company declare bankruptcy as my respectable boss told me what happened. Later I learnt, in order for a foreigner to start a company in Malaysia , a transaction of transfering have of the company assets and name under an assigned Malay man by the government.
The racism here is real and crazy. It is no surprise most Malaysian migrating to Taiwan, China Singapore , Thailand and some western countries.
I hate racism. Recently I heard news about western countries still have the hatred against Asians which I abort the idea of migrating there. But in my country Asians are hating other kind of Asians before for being different Asian.
May be I should just get my arse back to Mongolia (where my ancestors will be )6