Inspiration

The 2019 School Crime Supplement to the National Crime Victimization Survey (National Center for Education Statistics and Bureau of Justice) indicates that, nationwide, about 16 percent of students in grades 9–12 experienced cyberbullying. When a school monitors for web traffic, the blockage is too broad and has obvious exploited loopholes like using VPN. Most information communicated electronically is permanent and public, if not reported and removed. We came together to provide a new way to counter cyberbullying, following the ideology that ignorance is strength[1].

What it does

Our application monitors ALL web traffic, targeting set domains to block key selected words by user, and additional blockage with our trained NLP model for cyberbullying. It has a built-in web interface that allows for ease of configuration and display of intercepted messages along with their source and time.

Why use this?

Parents can use this web application to block specific domains and keywords and all bullying-related text on their child's devices, rerouting it back to the application and allowing the parents to be informed of the source of bullying. Parents can immediately prevent cases of cyberbullying from escalating and also understand what type of bullying their child is going through, and where it is coming from. By preventing the child from seeing the offensive texts, emotional trauma that may occur is reduced, and the child's mental state improves. This results in better academic performance and improves physical and mental health.

How we built it

Set up mitmproxy in Python3 to check out web traffic and target requests containing messages. The frontend is built with React.js with Redux for state management. The frontend short polls for intercepted messages to display. The backend is created with Python3 with Flask framework for RESTful API. Configuration initially gets loaded into the frontend from the backend, allows for modification through GUI, and sends a POST request to update the backend. Then the settings are short-polled by the proxy to intercept messages based on settings. Our model is trained on offensive cyberbullying text, where messages are sent by proxy to the model, and a confidence score is returned to determine whether to flag it down. If flagged, POST to the backend, which can be retrieved to display.

Challenges we ran into

It was difficult trying to intercept messages through API as most messaging apps are secure and have their messages encrypted, but we were able to crack these encryptions on a service basis for sites like Instagram and Twitter. Training the NLP model with a small amount of labeled cyberbullying was tricky, but we were able to resolve this by training the model to detect offensive tweets(of which there is an abundance of data) and adapting that to be applied to cyberbullying.

Accomplishments that we're proud of

We are proud of integrating our machine learning model, our proxy, Flask server, and React frontend together. It was configured with scalability in mind and, with time, could be easily improved to be better. Another great accomplishment was intercepting the right messages with a minimal delay so that the client would not experience lag. The interception was made to be seamless to prevent knowledge of any cyberbullying.

What we learned

We learned how to work together despite the long distances by using a VPN to access each other's projects and servers using the same subnet IP address. This enables us to share the same developer environment and effectively integrate our different components. Furthermore, We learned how to optimize our model and choose models that suit the situation, dataset, and real-life examples. Also, we learned how to operate Flask with repository patterns in Python to set up API endpoints and stand as a server and middleman between proxy and frontend. We learned that message encryption could lead to an investigation into how secure the messaging service is. This could prove valuable in projects that want to determine if an app is secure in transmitting data or not. Finally, We also learned how to utilize MitMProxy and how it can be configured to not only block web traffic but can act as a 'fake' server that sends 'fake' certificates to allow for TLS handshake and can also modify requests. Even with VPN, the proxy would still work as it is on the client side.

What's next for Why You Bully?

Breaking encryption and including more messaging apps to be more specific in targeting words. This would allow for broader coverage.

Finding better and bigger datasets and creating a better model, and potentially creating another service that dynamically generates hate speech to improve our NLP model and keep up with ever-evolving modern slang and insults.

Creating a native react application to be able to display as a phone application, allowing for better ease of use on mobile.

[1]In Moderation

Share this project:

Updates