Showing posts with label Hacking. Show all posts
Showing posts with label Hacking. Show all posts

Tuesday, 25 August 2026

From Exposed to Secure: Router Exposure Audit and Basic Hardening



hi kids, this is your dad, huahuanjayy wkwkwk, Nuenomaru the handsome is back in action.
Okay, this time your dad is going to write a tutorial Router Exposure Audit and Basic Hardening.

1. Introduction: When Your Router Appears on Shodan



- The phenomenon of routers with public IP addresses appearing in Shodan search results.
- A simple example is a PPTP service exposed on TCP port 1723 and detectable from the Internet.
- It is important to clarify that appearing in Shodan search results does not automatically mean that the router has been hacked or compromised.
- However, the presence of such an exposed service indicates that the router has an Internet-facing attack surface.

* The objectives of this article are to:
- Understand why PPTP can be detected from the Internet.
- Understand the risks associated with service exposure.
- Perform a basic security audit.
- Apply basic hardening measures.

***“A router doesn't have to be compromised to become interesting. Sometimes, being publicly visible is already the first thing worth investigating."***

2. What Is PPTP and Why Is It Exposed?

* Brief Explanation of PPTP
PPTP (Point-to-Point Tunneling Protocol) is a VPN protocol used to establish an encrypted tunnel between a client and a remote server over a network such as the Internet. It was widely used in the past for remote access and VPN connections. PPTP typically uses TCP port 1723 for control connections and GRE (Generic Routing Encapsulation) to carry tunneled traffic.
However, PPTP is now considered obsolete and insecure because it has well known security weaknesses. For modern VPN deployments, more secure alternatives such as WireGuard, OpenVPN, or IPsec/IKEv2 are generally recommended ^_^
* The basic architecture is:
- TCP/1723 is used for the control connection.
- GRE (Generic Routing Encapsulation) is used to carry the tunneled traffic.

Internet <> Public IP <> Router/firewall <> PPTP Server. (and nue was here ;) )
- The PPTP server is enabled on the router.
- The firewall allows incoming connections from the WAN.
- The router has a public IP address or port forwarding is configured.
- As a result, the service can be accessed from the Internet.

3. How Shodan Detects PPTP ?!! OMG >..<

* Shodan as an Internet-Wide Scanner
Port Discovery
      V
Service Detection
      V
Protocol Fingerprinting
      V
Banner / Metadata
      V
Indexed Result

* TCP/1723 as a PPTP Indicator
- The PPTP control connection uses TCP port 1723.
- If this port is accessible from the Internet, scanners can detect the service.
- Shodan can classify the service as PPTP based on the protocol’s characteristics.

* Protocol Fingerprinting
Shodan ---(internet scan)---> Public IP ---> TCP/1723 ---> PPTP Service ---> Protocol Fingerprint ---> "pptp" identified" UUUUWWOWW GOTCHAA ^_^

* What Shodan Visibility Actually Means
- Detected <> compromised
- Open port <> authenticated access
- Internet exposure = attack surface

4. Assessing the Risk of Exposed PPTP

* Why PPTP Is Considered Legacy
- PPTP is an older-generation VPN technology.
- It has historical security weaknesses in both its protocol design and implementations.
- PPTP is not as secure as modern VPN technologies.



* Exposure vs. Vulnerability
Condition <> Meaning
Open port <> The service is reachable.
Identified service <> The protocol can be identified.
Vulnerable service <> The service has a weakness that can potentially be exploited.
Compromised <> The system has been successfully taken over.

***Exposure is an indicator that an assessment should be conducted, not proof of compromise.***

* Potential Attack Surface
- unwanted connection attempts
- password-guessing/authentication attacks
- exploitation | vulnerability implemen router
- legacy protocol risks
- information disclosure service fingerprinting

5. Performing a Basic Exposure Audit

* Check the Router Configuration
- Is the PPTP server actually required?
- Is PPTP enabled on the WAN interface?
- Is remote access required?
- Does the firewall allow TCP/1723 connections from the Internet?
- Is there a firewall rule that allows GRE traffic?
- Is there any port forwarding configured for PPTP?

* Check from an External Perspective
Internal Configuration + External Visibility = Actual Exposure

* Review Shodan Results
If an organization’s own IP address appears in Shodan:
- Validate that the IP address belongs to the organization or the relevant device.
- Identify the exposed services.
- Document the exposed ports and services.
- Do not immediately conclude that the system has been compromised.

6. Basic Hardening From Exposed to Secure

* Disable PPTP If It Is Not Needed
*** This is more effective than simply trying to make the service “invisible” to scanners.***



* Replace PPTP With a Modern VPN
The choice of VPN should take into consideration:
- security
- compatibility
- authentication
- device support
- maintenance

* Restrict WAN Access
If PPTP must remain in use:
Internet ---> Firewall ---> Trusted Source → Allow | Unknown Source → Deny
***Allow only what is necessary.***

access based on:
- source IP
- source network
- VPN management network
- firewall policy

* Review Firewall Rules
Audit rule:
- TCP/1723
- GRE
- WAN > router
- port forwarding
- remote management

rule: ANY > Router > Allow

* Disable Unnecessary Services
Don’t stop at PPTP.
Also audit:
- Telnet
- HTTP management
- SSH WAN
- SNMP
- FTP
- UPnP
- service legacy
***If you don't need it, disable it.***

7. Configuration Example
Before

WAN
 |---> TCP/1723 > ALLOW
 |---> GRE      > ALLOW
 |---> Remote Management > ALLOW

After

WAN
 |---> TCP/1723 > DENY
 |---> GRE      > DENY
 |---> Remote Management > DENY

***Actual configurations vary across MikroTik, Cisco, OpenWrt, pfSense, FortiGate, and other vendors.***

8. Verify the Hardening

* Local Verification
- The PPTP server has been disabled if it is not required.
- The firewall rules have been updated.
- Remote management is not exposed to the WAN.

* External Verification
- Before
Internet > TCP/1723 > Router (Oh Yes Maz)
- After
Internet > TCP/1723 > Router (Oh No Maz)
             
* Recheck Shodan
If a service was previously indexed, configuration changes are not always reflected immediately in Shodan’s index.
Current network exposure <> Historical Shodan data
- This is a good point to include in the article because readers often assume that if the Shodan result is still visible, the configuration change was unsuccessful.

9 Hardening Checklist
- Verify whether PPTP is actually required.
- Disable PPTP if it is no longer needed.
- Prefer a modern VPN protocol.
- Restrict WAN access using firewall policies.
- Review TCP/1723 exposure.
- Review GRE-related firewall rules.
- Disable unnecessary WAN services.
- Restrict router management access.
- Update router firmware.
- Verify exposure externally.
- Recheck Shodan after remediation.

10. Conclusion Visibility is a Security Signal

***Being visible on Shodan is not the same as being compromised. But unexpected visibility should always trigger an investigation.***

PPTP exposed > identify why > assess necessity > restrict/disable > replace legacy technology > verify.


Well Done, Well Noted ndan~
Shodan visibility is not the problem. Unnecessary exposure is. Being visible on Shodan does not necessarily mean that a router has been compromised. However, it is a clear indication that a service is reachable from the public Internet and therefore deserves attention. PPTP is a legacy VPN technology, and exposing it directly to the Internet can increase the routers attack surface. The right approach is not simply to make the service disappear from Shodan, but to understand why it is exposed, whether it is still needed, and whether the exposure can be safely reduced.
Hahaha alright, that’s a wrap for today’s article—my coffee’s gone, so that’s my cue to stop typing.


Let’s end this with a Bismillah at the start and an Alhamdulillah at the finish. Catch you next time, tech gembelers!.





./Nuenomaru



Read More

Thursday, 19 June 2025

[Phreaking] Bug on CDN XL Axiata - Konfig Paketan video unlimited turbo

halo gais, nue ghanteng disini ^_^, ketemu lagi kita nich ya ~
sehat semua ?? sehat dong :)), ok bug ini gua dapet dari om fumi chicken mini, lumayan untuk kalian anak kost, bisa manfaatin paketan video only XL axiata, kita akalin biar bisa full internetan dgn kecepatan kereta Whoosh. Bug ini sudah work dari 2 bulan lalu sampai dgn saat artikel ini dipublish.

yang dibutuhkan/disiapkan:
1 Kartu XL Axiata ( saran makai kartu baru aja, takutnya kartu lu kena blokir kalao si anu dah notice, lalu identitas ktp dan kk cari aja data dari google, pas kemarin pemilu banyak tuh yg bocor datanya, maanfaatin aja)

2 aplikasi kentang clash ( sentuh aku utk download | atau sentuh aku )

3 http custom (ada diplaystore and appstore)

4 aplikasi myXL (utk beli paket video yg unlimited turbo)

5 akun v2ray (nanti gua kasih cara gratis/gretongan dan cara yg beli akun) 

note: kentang-clash dipakai kalau http custom gagal ~kadang suka gagal doi

 

Step by step:

1 Kartu XL Registrasi lalu beli paketan di MyXL (Paket videoo unlimited turbo)

ada dimenu addon > unlimited

2 install aplikasi kentang-clash dan http custom

3 ok kita create akun v2ray di ssh-store (utk yg gratis), dan jagoanssh (kalao u mao modal bayar)

 

step-step yang v2ray gratis + http custom:

1 buka ssh store sshstores.net , klik menu, klik v2ray server, pilih vmess websocket, kalau sudah pilih server, (cuba2 server yg masih bisa, ini belum tentu langsung work ya, jika belum bisa ganti negara saja)


kalau acc remainingnya full, itu gak bisa dipilih (jgn brharap sama barang yg dah banyak digrepe banyak-orang)

18 from 20 (alhamdulillah slot haji sisa 2, nyempil dikit) kalao yg ini cuba dipilih aja ya gais
 

2 jika sudah dipilih masukan username bebas dan bug bebas (gabungan huruf dan angka)

 

3 kalau sudah create akun

4 jika ada tulisan timeout brarti masih belum bisa, langsung back saja pilih server kembali
(username dan bug sesuai kesukaan kamu saja)


 

5 jika brhasil muncul informasi akun, dan akan muncul 2 barcode paling bawah:


6 Kita pilih yang config TLS, klik copy config TLS


7 Jika sudah dicopy, kita buka http custom, ditampilan awal aplikasi, ceklist enable dns dan v2ray yak

 


8 lalu buka settingan yg dh gua tandain panah diss atas, pilih v2ray setting

9 konfigurasi default hapus saja semua, paste konfig TLS yang tadi


10 klik tanda <> , lalu edit tls nya di enable dan insecurenya juga dienable


11 lalu form SNI Server-name ganti jadi bugnya menjadi: static-quiz.prod.vidiocdn.com

12  Kalau sudah klik konek
* Kalau sudah bisa muncul LOG HTTP CUSTOM READY TO USE
- Nah kalau sudah konek, cuba buka google , buka speedtest saja, nah brhasil deh paket video only mu, bisa di pake segala macam kebutuhan internet mu

 

step-step yang v2ray gratis + kentang-clash:

1 Kentang-clash dipakai jika http custom gagal konek ea, langsung aja BUKA KENTANG-CLASH
2 EDIT KONFIG


3 yg di pakai di konfig tls tadi hanya host/SERVER sama ID AKUN


4 kalau udah save
5 lalu klik start
6 jika sudah running dan muncul traffic maka sudah bisa dipakai, jika 0 traffic maka belum bisa

 

step-step yang v2ray berbayar: 

1 buka web jagoanssh
2 buat akun kalian
3 login ke web jagoanssh
4 kalau sudah masuk ke panel, klik menu lalu masuk ke top up balance
5 kalian harus topup dl, jgn gretongan mulu


6 jika sudah top up, nanti ke menu create akun, lalu pilih v2ray, create v2ray


 

7 lalu kalian pilih server mana, lihat full atau tidak , pilih kemauan kalian
8 lalu create akun v2raynya


9 masukin username secara bebas, dan durasi, bisa trial dan lain2 trserah lu


10 jika sudah klik create
11 jika sudah muncul informasi akun dan barcode, lalu copy vmess ws,


12 masuk ke http custome, sama seperti tadi kosongin dl

13 lalu paste yg dari vmess ws, habis paste edit bagian SNI server(kalau yg brbayar, konfig defaultnya sudah enablekan otomatis tls and insecurenya)

14 lalu sama seperti tadi, konekin nya (pokokny samain kek tadi yak)

15 lakukan transfer akun jika akun mu error (hanya tips)

16 untuk dikentang-clash sama kek tadi ya, hanya server and idnya aja yg digonta ganti, bug tetep sama: static-quiz.prod.vidiocdn.com

okk berhasil sob~

cuba kita itung2an ya

dana dikeluarkan pertama kali:

1 kartu XL 10 ribu

2 paket video unlimited turbo 25 ribu

3 akun v2ray (kalau lu make yg brbayar 10 ribu)

total 45 ribu awal dana keluar lu, kalao lu gak make v2ray brbayar, ya jadi kurangin aje 10 ribu.

nanti pas bulanan lu cukup bayar video unlimited turbo paketnya aja 25 ribu, gila 25 ribu tiap bulan tapi internet kenceng dan unlimited, gimana gak nyengar nyengir lu. sisa duit bisa lu tabung buat mijet di delta spa kan ^_^ simcardnya bisa lu pake juga buat dimodem, biar keluarga lu seneng tuh wifian.

well d0ne mz~ Shout out om fumi chicken mini

 

Terima kasih,
Nuenomaru yang namanya sekarang sudah mulai memudar terhapus oleh waktu :) #hikssyedihhhh 


Read More

Tuesday, 11 March 2025

picoCTF - droids4




tools yang dibutuhkan untuk mengerjakan soal ini yaitu :

  1. Jadx

  2. Android studio



Buka aplikasi four.apk menggunakan jadx

A screenshot of a computer

Description automatically generated


 Buka file FlagstaffHill

A screen shot of a computer

Description automatically generated






Mari kita fokus pada function getFlag


public static String getFlag(String input, Context ctx) {
        StringBuilder ace = new StringBuilder("aaa");
        StringBuilder jack = new StringBuilder("aaa");
        StringBuilder queen = new StringBuilder("aaa");
        StringBuilder king = new StringBuilder("aaa");
        ace.setCharAt(0, (char) (ace.charAt(0) + 4));
        ace.setCharAt(1, (char) (ace.charAt(1) + 19));
        ace.setCharAt(2, (char) (ace.charAt(2) + 18));
        jack.setCharAt(0, (char) (jack.charAt(0) + 7));
        jack.setCharAt(1, (char) (jack.charAt(1) + 0));
        jack.setCharAt(2, (char) (jack.charAt(2) + 1));
        queen.setCharAt(0, (char) (queen.charAt(0) + 0));
        queen.setCharAt(1, (char) (queen.charAt(1) + 11));
        queen.setCharAt(2, (char) (queen.charAt(2) + 15));
        king.setCharAt(0, (char) (king.charAt(0) + 14));
        king.setCharAt(1, (char) (king.charAt(1) + 20));
        king.setCharAt(2, (char) (king.charAt(2) + 15));
        String password = "".concat(queen.toString()).concat(jack.toString()).concat(ace.toString()).concat(king.toString());
        return input.equals(password) ? "call it" : "NOPE";
    }




Terdapat 4 stringbuilder dengan nama ace, jack, queen, king. Setiap stringbuilder memiliki operasi setCharAt, Dimana operasi ini berfungsi untuk mengubah setiap char pada index yang dituju menjadi sebuah char baru sesuai request dari pembuat.



ace.setCharAt(0, (char) (ace.charAt(0) + 4)); // 'a' + 4 = 'e' 

ace.setCharAt(1, (char) (ace.charAt(1) + 19)); // 'a' + 19 = 't' 

ace.setCharAt(2, (char) (ace.charAt(2) + 18)); // 'a' + 18 = 's'


hasilnya = ets



jack.setCharAt(0, (char) (jack.charAt(0) + 7));  // 'a' + 7  = 'h'

jack.setCharAt(1, (char) (jack.charAt(1) + 0));  // 'a' + 0  = 'a'

jack.setCharAt(2, (char) (jack.charAt(2) + 1));  // 'a' + 1  = 'b'


hasilnya = hab



queen.setCharAt(0, (char) (queen.charAt(0) + 0));  // 'a' + 0  = 'a'

queen.setCharAt(1, (char) (queen.charAt(1) + 11)); // 'a' + 11 = 'l'

queen.setCharAt(2, (char) (queen.charAt(2) + 15)); // 'a' + 15 = 'p'


hasilnya = alp



king.setCharAt(0, (char) (king.charAt(0) + 14)); // 'a' + 14 = 'o'

king.setCharAt(1, (char) (king.charAt(1) + 20)); // 'a' + 20 = 'u'

king.setCharAt(2, (char) (king.charAt(2) + 15)); // 'a' + 15 = 'p'


hasilnya = oup



sekarang kita fokus pada variable password.

String password = "".concat(queen.toString()).concat(jack.toString()).concat(ace.toString()).concat(king.toString());


Password berisi gabungan dari stringbuilder queen+jack+ace+king



Waktunya kita coba password yang kita sudah temukan pada aplikasi fourth.apk

Jangan lupa untuk install aplikasi pada emulator android studio, bisa menggunakan command 

“ adb install four.apk”

Atau langsung drag and drop aplikasi fourth.apk pada emulator kalian.


A screenshot of a phone

Description automatically generated

Jika kalian input password salah, returnnya akan “NOPE” sedangkan jika menggunakan password yang benar returnnya akan “call it”.


Lalu Dimana flagnya?



Kembali pada file FlagstaffHill, kita akan melihat sebuah function dengan cardamom (?)

Bagaimana jika kita ubah “call it” menjadi cardamom(input), mungkin flag terdapat didalamnya.

A screen shot of a computer

Description automatically generated




Kita decompile dulu four.apk menggunakan apktool


A screen shot of a computer

Description automatically generated


Buka file flagstaffhill.smali menggunakan android studio


A screenshot of a computer program

Description automatically generated



Cari  const-string v5, “call it”

A screenshot of a computer program

Description automatically generated

Rubah menjadi 

invoke-static {p0}, Lcom/hellocmu/picoctf/FlagstaffHill;->cardamom(Ljava/lang/String;)Ljava/lang/String;

lalu tambahkan

move-result-object v5


A screenshot of a computer

Description automatically generated


Save, lalu build menggunakan apktool


A screenshot of a computer program

Description automatically generated


Jangan lupa untuk buat signature baru untuk aplikasi hasil rebuild.





Setelah membuat signature baru, kita tambahkan signature tersebut ke aplikasi new_four.apk


A screen shot of a computer

Description automatically generated



Jika sudah, kita install new_four.apk pada emulator, dan masukan password yang sudah kita susun


A screenshot of a phone

Description automatically generated



Read More