question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reliable WordPress detection

See original GitHub issue

One requirement for adding a stack pack is reliably detecting that the stack/library/platform is being used by the page. We want this detection to be as reliable and bulletproof as possible.

Wappalyzer uses a few approaches which seem overkill and not something we can reuse. We’d like something much more lightweight.

Primary question: Can we detect wordpress via via clientside JS running in the page? (Naturally, it has full access to window and the DOM.)

Secondary question: Is there another reliable detect based on the network request metadata? We’d like to avoid parsing the response of any network resources (so no looking for patterns in HTML, JS or CSS files). But considering response headers or paths in urls (like wp-content, etc) is fine.

Could some WordPress experts chime in?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
igrigorikcommented, May 9, 2019

Since the whitelisting stuff is not really an option what’s your thought on having a XMLHttpRequest against an endpoint on the CMS side of things that LH could do to determine which system it’s talking to.

How would one protect such an endpoint? As in, exposing such a mechanism would work against the very reason why you were stripping the platform+version information. Further, I don’t think we can or should rely on new endpoints…

Yeah, why not check whether /wp-admin/ does not deliver a 404.

That requires an additional out of band request which, while not impossible, is something we’d like to avoid.

Stepping back, I’ll come back to what I said earlier: if your site is designed to hide all platform information, then the fact that LH is not able to detect it is not a bug, it’s WAI. Despite that, developers that want to see stack specific advice can still get access to it… by, for example, configuring the environment to expose those signals under certain conditions. Alternatively, one could also imagine a UI where you can manually pick which stack pack strings LH shows, even if LH is not able to detect that platform itself.

Does that seem reasonable? 😃

2reactions
Shelob9commented, Feb 5, 2019

wp-content is the default it can be changed by setting a constant in wp-config. wp-includes (effectively) can’t be changed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

14 Best WordPress Security Scanners for Detecting Malware ...
wprecon is another basic WordPress vulnerability scanner tool. It detects WordPress version to see if you need updates, checks Google Safe ...
Read more >
6 of the Best WordPress Theme Checkers & Detectors | WP Buffs
Scan WP is a high-quality WordPress theme detector. This tool can detect the majority of plugins and themes being used on specific WordPress...
Read more >
3 Best Online WordPress Theme Detectors of 2022
A list of best free WordPress Theme Detectors which work online to detect WordPress theme and WordPress plugins are used by the website...
Read more >
The Best WordPress Security Plugins To Lock Out Malicious ...
This security plugin bundles solid art intrusion detection (IDS) to block real-time security attacks like SQL injection, XSS, and others. It ...
Read more >
9 Best WordPress Malware Removal Plugins (2022) - BlogVault
Manual cleanups are expensive · Repair and delete options not foolproof or entirely safe · File matching for malware detection · False positives...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found