barronwaffles / dwc_network_server_emulator

A Nintendo DS and Wii server emulator.
GNU Affero General Public License v3.0
1.06k stars 165 forks source link

Ban Support #57

Closed xperia64 closed 5 years ago

xperia64 commented 10 years ago

May as well make it an official issue. We need a method to ban people. The first match I got in a long time in Mario Kart Wii was with a cheater who wasn't even subtle, spamming infinite blue shells.

Anyway, for DS, we really can only ban by MAC+IP address. For Wii, we can ban by MAC address+Console ID+IP.

Although given the situation with Dolphin's non-unique CID, simple IP banning may be a better approach all around.

Tcll commented 10 years ago

not when one can actively change their IP or provide you with a fake IP. then you may end up banning someone else instead of who you're trying to ban.

EDIT: don't ask me how, I only more than know it's possible. (including any device connected to your router/modem)

xperia64 commented 10 years ago

I am aware that IP spoofing possible. However, CID and MAC can also be spoofed (including to other people's), and are more easily modified with Ocarina/AR codes. Additionally, with CID/MAC banning we'd end up like WiimmFi in terms of (lacking) dolphin support.

While it is very possible we may falsely ban some people, how likely is it that the spoofed IP address even belongs to someone else who uses AltWFC?

There is no question that a ban system is necessary, so unless you can propose a better method, IP banning is still the way to go.

mm201 commented 10 years ago

Allow CID and MAC bans, and just be careful not to ban all of Dolphin?

Keep banlists for IPs, PIDs, CIDs, and MAC addresses, and when we pull the trigger, add an entry to each of these lists (unless the CID/MAC is Dolphin's, in which case just ban PID and IP).

Tcll commented 10 years ago

don't get me wrong, when it comes to MKW, I do agree with ban support, I just wanted to make a note.

games like Brawl though don't really need ban support as the game already punishes when the match desyncs (I have 5 lives while you have 1 life on my screen, but on your screen both of us have 5 lives). when the match ends, the game will freeze.

what I'm saying is the ban support should only be allowed for certain games. if they're banned on MKW, don't ban them globally.

ghost commented 9 years ago

Are you planned to add a ban system like Wiimmfi ? (With Console and Profile ban for all games, just like Wiimmfi). It can be very useful because AltWfc need a ban system quickly to ban some MKW hackers.

kyle95wm commented 9 years ago

I'd kinda like to know how to set up a simple ban system for my version of the server (once I get it up and running) and how to manage it (also how to find people's CID, MAC, etc)

SMTDDR commented 9 years ago

Just FYI another hacker out there is trying to do something for Mario Kart: https://www.youtube.com/watch?v=xmFqBy7ZZV0

mm201 commented 9 years ago

This is pretty cool but it looks like a 100% client-side approach and is therefore outside the scope of our project.

SMTDDR commented 9 years ago

True, it'd be another project entirely. fwiw, I wouldn't mind working on code that runs client-side if y'all decide to start another project :-)

kyle95wm commented 9 years ago

Thought I'd post here because it's more relevent rather than continuing the convo in the "set up your own server" topic

@SMTDDR - Ive now gotten the chance to test the admin page and it works (somewhat) like expected BUT the entire console doesn't receive a ban (just the profile) which can easily be bypassed via creating a new profile. Why does this happen? Is there a way to counter this to turn it into a true console ban?

SMTDDR commented 9 years ago

Yeah, we were kinda chatting about that in irc. I'm going to try fixing that with 2 changes. I think the "users" table should get a unique constraint on columns "gsbrcd" and "gameid". I'm pretty sure that any rows that have the same gameid & gsbrcd are leftovers from erased savedata and only the row with the biggest profileid is active. Then, some changes need to happen in gs_database.py such that before it does an "INSERT INTO users", it first checks if a row with the incoming gsbrcd & gameid already exists. If so, it should then check if that row's enabled column is set to zero. If it is zero, it should not do the insert.

I'm going to write a separate python script that will clean up the users table; leaving only the active profileIDs in there. In case I screw things up, you should make a backup of gpcm.db to restore from. But for now, I'll write code assuming that duplicates can exist. The clean up script will be something to run only if you feel like it or until everyone truly agrees on it and polaris pulls the new logic into this repo.

SMTDDR commented 9 years ago

Okay, worked with BeanJr and we got something that works. Clearing your local savegame data doesn't bypass the ban anymore. It'll take more than that.

Of course, with the existence of hacked-Wiis & Dolphin... nothing is 100%.

SMTDDR commented 9 years ago

Not sure how to make a PR out of this: https://github.com/SMTDDR/dwc_network_server_emulator/commit/fad226a2301134a71783c21d4b6cde7500002d46 -My master branch already diverged from this repo.

I could just do it, if polaris can cherrypick only the 3 files related to admin & banning.

SMTDDR commented 9 years ago

(╯°□°)╯︵ ┻━┻

BeanJr has just informed me that Dolphin does this by default: userid=0000000000000,gameid=RMCJ If you ban a dolphin player, they all get banned. So... yeah ...I dunno.

kyle95wm commented 9 years ago

Sorry to bump this, but any luck getting to port 9009 on your server @polaris- ?

kyle95wm commented 9 years ago

I'd say we've done all we can to get ban support working wouldn't you say?

kyle95wm commented 7 years ago

So @polaris- recently said in a recent PR that he was going to work on improving the server.

I'm revisiting the ban system because my fork is completely outdated, so here are some of the things I'd like added to the official repo:

A lot of the above suggestions are already on my fork, just not up to the new "standards" that @sepalani coded in a while back.

On a completely un-related note, I would like to see the stats page (port 9001) to be updated to show not just active games, but active users too. This would make it easier to spot players in a room and ban them. Perhaps this can ben an admin only feature integrated into the port 9009 page?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.