Hello everyone,
I've been a bit MIA lately. Between a new job and the first semester of my studies,
I've been swamped. While I've missed coding and hacking on HTB, I'm excited about the new challenges and knowledge I'm gaining.
My boss has been a fantastic resource, always patient and insightful with my questions.
As I was reflecting on my digital security, I realized a crucial vulnerability: my reliance on online TOTP services like Google Authenticator and Microsoft Authenticator. While these services are convenient, they introduce a significant attack surface.
Determined to enhance my security without breaking the bank, I sought a DIY solution. The idea was simple: create a script that generates TOTP codes offline.
I initially struggled to recall the necessary coding knowledge, but thanks to ChatGPT, I was able to quickly put together a basic script.
Implementation:
import pyotp
# Replace with your TOTP secret key
secret = "YOUR_TOTP_SECRET"
# Generate TOTP code
totp = pyotp.TOTP(secret)
print("Your TOTP code is:", totp.now())
While this approach requires a bit more effort, it significantly reduces the risk of a security breach. Remember, there's no 100% security, but by taking proactive measures, we can bolster our digital defenses. I encourage you to consider implementing a similar strategy to safeguard your most critical accounts.