r/webdevelopment • • 7d ago

Question Moderating a pastebin site

Hello,

I am making a pastebin application that is zero-login. I recently saw a post about someone who made a url shortner, and people were using it for phishing and such. That got me thinking, how can I protect my app against such threats. A pastebin is basically a url-shortner, just to text. That text may contain links to illegal sites or other things I don't know about. It is arguably more versatile than a url shortner, which makes moderation more difficult.

I thought of maybe analysing the pastes for links and sending it to a third-party link analyzer(think Google got one). Which is good enough for most cases. But you would kind of conflict with users pasting these links for research purposes, for example. I simply lack the knowledge of how people may misuse the system.

So, taking that into account, what steps would you take to protect this site?

5 Upvotes

8 comments sorted by

1

u/RelativeOk4088 7d ago

ai mod that runs all code on ur server

1

u/StatementExtra8062 7d ago

What do you mean by ai? Like a small fast spam and/or phishing transformer or a small ML model that flags suspicious link in addition to link analyzer services?

1

u/ContributionEasy6513 6d ago

Honestly, don't.

Not worth the DCMA and police reports.

Make sure at the minimum you are logging IP and browser information.

thought of maybe analysing the pastes for links and sending it to a third-party link analyzer(think Google got one). Which is good enough for most cases.

Big privacy issue if you are sending all data to third-parties. Try to keep any processing local.

1

u/StatementExtra8062 6d ago

What I meant by sending data I meant searching the pastes for links and using something like google's Web risk api to check if it is malicious.

Other than that I thought of using small AI/ML models to assign a risk for every paste and block above a certain threshold.

1

u/Friendly_Recover286 5d ago

Waste of time and resources. You'll never get all of them and if your site by some miracle did get popular enough to have to worry about this people will be looking for ways to get around it faster than you can fix them.

It's not worth trying.

1

u/StatementExtra8062 4d ago

By your logic we should stop trying to do cyber security since people will always find work arounds.

I don't intend to catch them all, just trying to make it harder for people to abuse it.

Also the challenge in of itself will help me learn even if I fail spectacularly.

1

u/gm310509 14h ago

This sounds a little more like a legal question than a technical one.

That said, it is a bit of both, but you probably need to understand the legal aspect - e.g. are you acting as an information provider or just a delivery service? Once you understand that then implement the technical aspects to fill any gaps that you feel are important.

I am not a lawyer, but lets say someone is sharing some sort of dodgy or illegal information - they are potentially committing a crime and could get into some trouble. Now, what if they sent that information through the postal service. Is the postman going to be responsible for what somebody else put in the letter? Probably not. I get that my analogy isn't perfect - as I said I am not a lawyer, but this type of issue has been argued before in legal circles and there are some rules that have been determined. Also note that you need to find out for your jurisdiction, an internet search won't be good enough because you may get information for the wrong jurisdiction and that would be bad for you.