Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8202873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:20:45+00:00 2026-06-07T07:20:45+00:00

We are trying to locate a PHP script that is assembling a query and

  • 0

We are trying to locate a PHP script that is assembling a query and causing havoc. So far we have not succeeded in using grep to locate the script.

Is it possible to use the mySQL pids from show processlist to locate the PHP script issuing the query?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:20:46+00:00Added an answer on June 7, 2026 at 7:20 am

    Don’t think so. Much would depend on actual architecture and topology.

    Maybe – this, too, might be hugely disruptive, depending on the context – you could attempt to override the mysql_query function (or whatever wrapper is in use among the various scripts) so as to recognize the misbehaving/malicious query and log all relevant information.

    See: https://www.php.net/runkit_function_redefine

    Since the logging would take place from "inside" the havoc-wreaking script, much more information would be available.

    Another possibility could be to filter MySQL queries and induce some recognizable behaviour in the script, like waiting for a long time or throwing an error. This might be doable through MySQL Proxy: https://launchpad.net/mysql-proxy

    Assuming the script is malicious, inability to locate it might point to some kind of encryption – and usually such scripts make heavy use of eval(), base64_decode and sometimes gzuncompress(). Looking for these functions might be more productive than searching for the query fragments.

    A useful hack, not very useful now, could be to "decorate" queries with revealing comments, such as, "SELECT … WHERE …; — 012345": the "– 012345" part would be ignored by MySQL, but could be easily logged, and grepping "– 012345" would quickly find the target.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP script that uses cURL to access a file also located
I'm trying to use this php script in order to locate a stock quote
I'm trying to develop a script (in php) that anlayzes web pages and wondering
I am trying to execute a command from php script using php exe function.
I am trying to locate in the HL7 Stream for the segment that will
I am trying to locate leaks using instruments, but the leaks I see there
Using Selenium IDE, I am trying to locate a link within a table row.
I'm working on a program right now that calls the script mail.php located in
I have an existing large(ish) PHP web app (using Apache and MySQL) which now
I'm trying to locate php_intl.dll and install it. Does anyone have any tips?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.