Inspiration
The idea for Hacklock was born out of a desire to understand and expose vulnerabilities in mobile device security. We were intrigued by the contrast between user-friendliness and security, and wanted to explore how easily a simple pattern lock system could be exploited. Participation in local hackathons and discussions among peers further motivated us to create an educational proof-of-concept that highlights the significance of robust security measures for mobile devices.
What it does
Hacklock is a bash-based script designed specifically for the Termux environment on Android. With just a single click, it generates a phishing page that mimics a device’s pattern lock interface. When the victim enters their pattern, the tool captures the input pattern (translated into numbers) and delivers it back to the attacker’s device. This demonstration tool works on both rooted and non-rooted devices, illustrating how a critical vulnerability in a common security feature can be exploited.
How we built it
The development of Hacklock was an iterative process combining research, coding, and hands-on testing:
Platform Choice: We selected Termux because it allows a full Linux environment on Android without the need to root the device, making our tool accessible and versatile.
Bash Scripting: The tool was built using Bash scripting to leverage native Linux commands for network operations and process control. We integrated various utilities like PHP (for the web server) and Ngrok (for exposing local endpoints), ensuring the tool could work seamlessly across different systems.
Testing and Iteration: We developed and refined the script iteratively. Extensive tests on multiple devices helped us fine-tune the phishing interface and ensure consistent performance on both rooted and non-rooted Android devices.
Community Feedback: Insights from hackathon peers and mentors guided improvements throughout development—especially in making the setup as simple as a one-click operation.
Challenges we ran into
While building Hacklock, we faced several technical and ethical hurdles:
Permissions on Android: One of our main challenges was designing a solution that works on non-rooted devices. We had to implement fallback mechanisms and work around the limited permissions available in Termux.
Reliability and Compatibility: Testing across different Android versions required thorough debugging to address variations in system behaviors. We had to optimize the script to reliably launch the PHP server and maintain a stable Ngrok tunnel.
Ethical Considerations: Balancing the project’s educational value with potential misuse was crucial. We spent time ensuring that all documentation clearly stated that Hacklock is meant only for authorized, ethical testing scenarios.
User Experience: Simplifying the process into “one click” while integrating multiple components (web server, tunneling, phishing interface) was technically complex and required refining the workflow to reduce potential points of failure.
Accomplishments that we're proud of
We are extremely proud of several milestones achieved during this hackathon:
Fully Automated Process: Streamlining the entire operation into a single-click script that sets up all necessary components was a significant technical achievement.
Cross-Platform Functionality: Creating a tool that works on both rooted and non-rooted devices widened its applicability and demonstrated our depth in understanding Android systems.
Educational Impact: Hacklock serves as a powerful demonstration tool in cybersecurity workshops and ethical hacking classes, raising awareness of vulnerabilities in simple authentication mechanisms.
Community Recognition: The positive feedback from peers and mentors validated our approach and reinforced the importance of transparency and ethical usage in the cybersecurity community.
What we learned
Throughout the development of Hacklock, we gained valuable insights into various domains:
Deep Dive into Bash Scripting: Our proficiency in Bash increased dramatically, along with an understanding of how to interact with network services and manage processes on Android.
Working within Constraints: We learned creative ways to work within the limited permission model of non-rooted devices and discovered numerous methods to bypass these restrictions in a controlled manner.
Security Best Practices: This project highlighted the ethical challenges involved in demonstrating vulnerabilities. It reinforced the importance of designing with security in mind—and the responsibility we hold as developers.
Iterative Development: The value of rapid prototyping and continuous feedback became clear. Each iteration brought improvements that made the final product more robust and user-friendly.
What's next for 30points
Looking forward, the 30points team (the identity behind Hacklock) has several exciting plans:
Enhanced Features: We plan to extend Hacklock’s capabilities with additional features like multi-factor authentication simulations and enhanced logging for educational purposes.
Improved User Interface: We’re working on a more polished graphical interface, which would make demonstrations even more realistic and increase the tool’s accessibility in educational settings.
Broader Application: Future versions will incorporate modules that simulate other types of device vulnerabilities, providing a comprehensive toolkit for learning mobile cybersecurity.
Community Collaboration: We aim to turn Hacklock into an open-source project where contributions from the global cybersecurity community can help evolve the tool responsibly.
Training and Workshops: The team is exploring collaborations for workshops and online courses that use Hacklock as a case study to educate both aspiring and experienced professionals on ethical hacking.
Log in or sign up for Devpost to join the conversation.