Detect Profiling Phase

Patient Tools

Read, save, and share this guide

Use these quick tools to make this medical article easier to read, print, save, or share with a family member.

Article Summary

The ideas proposed into this page can seems to be uncommon, aggressive or a little bit crazy in corporate environment (like a web banking) but the initial page author is personally convinced that if we can detect a profiling phase and send sign, to the originator, indicating clearly to them that "we know what is currently doing" we must be able to stop attack before...

Key Takeaways

  • This article explains Reminder about profiling phase of an attack in simple medical language.
  • This article explains How can we detect that a application is currently under profiling? in simple medical language.
  • This article explains We have detected a profiling phase then how application can defend itself? in simple medical language.
Educational health guideWritten for patient understanding and clinical awareness.
Reviewed content workflowUse writer and reviewer profiles for stronger trust.
Emergency safety firstUrgent warning signs are highlighted below.

Seek urgent medical care if you notice

These warning signs are general safety guidance. Local emergency numbers and clinical judgment should always come first.

  • Severe symptoms, breathing difficulty, fainting, confusion, or rapidly worsening illness.
  • New weakness, severe pain, high fever, or symptoms after a serious injury.
  • Any symptom that feels urgent, unusual, or unsafe for the patient.
1

Emergency now

Use emergency care for severe, sudden, rapidly worsening, or life-threatening symptoms.

2

See a doctor

Book a professional medical evaluation if symptoms persist, worsen, recur often, affect daily activities, or occur in a high-risk patient.

3

Learn safely

Use this article to understand possible causes, tests, treatment options, prevention, and questions to ask your clinician.

The ideas proposed into this page can seems to be uncommon, aggressive or a little bit crazy in corporate environment (like a web banking) but the initial page author is personally convinced that if we can detect a profiling phase and send sign, to the originator, indicating clearly to them that “we know what is currently doing” we must be able to stop attack before that it can cause damage.

Into the context of the web application, defensive security is applied in order to avoid attacks to be successful. This page proposes some ideas in order to be more “proactive” by trying to detect attacks preparation and take measures against the attacker before that any attack be launched.

This page is provided with Java projects in which examples of implementation described into this page are showed:

Links to source code management system are provided instead of static archives because initial authorcontinue to work on profiling detection and attacker identification concepts using feedback coming from implementationin real production application.

Reminder about profiling phase of an attack

Except on TV, attacking a web application (or anything) always start by a phase in which the target is deeply analysed in order to gather as much information as possible about it (web server software, application framework, application software version and type, operating system…).

This phase is commonly called “profiling” and this one takes a big place into the attack time frame. The profiling can be performed in a “passive” or “active” way:

  • The “passive” way is performed using public information and/or navigating on the target

application without doing any suspicious behaviour (browsing like a normal user), the objective here is to not be detected.

  • The “active” way is performed by having behaviour on the target application than can, perhaps, generate alerts depending on the monitoring in place

(example: sending HTTP request with an invalid parameter value in order to see how the application behave).

How can we detect that a application is currently under profiling?

Passive profiling

Concept

Using this method, it’s difficult to distinguish a normal user than an attacker. An idea is to analyse the number of application functionalities visited by user in a representative time frame.

Normal user will only use a part of the application or will use the entire application but on an extended period (one week, one month…) but an attacker will visit as much functionalities as possible in a representative time frame.

Take all the web application that you use in your personal/professional life, afterwards count how many functionalities do you use and for how long ? Interesting track to explore it is not ?

Implementation

The idea is to uniquely identify a HTTP request sender in order to trace is set of requests. There no “silver bullet” method here because IP can be spoofed and HTTP request can be easily forged but, using information for these sources, we can still catch a panel of attacker. As a skilled and motivated attacker cannot be stopped, the goal here is to raise the skill level required to play with the application.

We will use the information below to identify sender:

  • Sender IP address,
  • HTTP request headers:
    • Accept,
    • Accept-Encoding,
    • Accept-Language,
    • Connection,
    • User-Agent.

We will use storage to keep information below:

  • Digest of the HTTP request sender information above (used as unique ID),
  • Identifier of the application functionality visited (URI for example),
  • Last visit date time.

We also need to know the list of functionality exposed by the application in order to perform comparison. This one can be stored into the same storage than information above.

We will assume here that the representative time frame is two weeks.

For each HTTP request, we will store the hit and next check if, for the last two weeks, the visitor has visited all the application functionalities. If it’s the case then:

  1. We send all current request information (we send information here because in the store we only keep a digest) to a monitoring system in order to generate an alert and launch a review of the sender information in order to decide if aggressive defensive measure should be taken against them,
  2. We clean the store with the information of this sender (in order to avoid duplicate alert). Optionally it’s possible to move information to archive storage type in order to perform global statistic processing for the application but it’s not the goal here.

See this class PassiveDetectionFilter for implementation details.

Active profiling

Concept

When an attacker use this method it’s a little much easier to detect the profiling behaviour. There several point into the application that can be checked for abnormal behaviour.

One of them is the invalid value submitted into application form, indeed we can analyse (during input validation step) the number of invalid values submitted by a user into a functionality (bank transfer form for example).

If the count of error is superior to an acceptable limit (three for example) we can assume that the visitor is playing with the application. This method is efficient but can lead to false positive in the case of some lubberly user.

There another more subtle way to detect profiling by literally “phishing the attacker”. In this method, we put some “honeypot” into the application. “Honeypot” are represented here into the form of a special custom cookie or custom HTTP header that sounds to be very interesting to the attacker.

Theses cookies/headers are good place because a normal user will not modify theses (they are managed by the browser). An attacker will probably try to modify the value in order to check if the application behaves in different way and it’s at this point that we can detect the profiling.

Implementation

We will focus here on cookies area. The idea is to find, according to application context and functionalities provided, an interesting name and value for a cookie.

We assume here that we want to detect profiling without requiring user to be authenticated and we also assume that there no real application session opened with the user. Like for “Passive” profiling, we will use some information from incoming HTTP request to uniquely identify a HTTP request sender in order to trace is set of requests.

Expected value will be hard coded string in order to not impact application performance.

The table below lists the name and value of the fake cookie that will be issued at first visitor request:

NameDescriptionValueLife Time
verbose_modeSimulate a flag that can enable development mode (verbose) of the application.false1 day

See this class ActiveDetectionFilter for implementation details.

We have detected a profiling phase then how application can defend itself?

There several way to apply counter measures against an attacker in order to bother them in their task and we can classify them according to their level of invasion on the client.

Invasive measures are not legal but it’s very rare that an attacker file a claim against is target.

Level 1: Without invasion

Simply block connection to application

Close TCP/IP connection or block list IP address.

Level 2: With invasion

Gather information about attacker from is computer

Run client application through browser plugin (for example Java applet signed by the company, crafted pdf file…) and gather information like geographically location, browser cookies, system environment variables or any others personal information in order to obtain location/identity of the attacker.

Patient safety assistant

Check your symptom safely

Hi, I am RX Symptom Navigator. I can help you understand what to read next and what warning signs need care.
Warning: Do not use this in emergencies, pregnancy, severe illness, or as a substitute for a doctor. For children or teens, use with a parent/guardian and clinician.
A rural-friendly guide: warning signs, when to see a doctor, related articles, tests to discuss, and OTC safety education.
1 Symptom 2 Severity 3 Safe guidance
First safety question

Is there chest pain, breathing trouble, fainting, confusion, severe bleeding, stroke-like weakness, severe injury, or pregnancy danger sign?

Choose quickly

Browse by body area
Start here: Write or select a symptom. The guide will show warning signs, doctor guidance, diagnostic tests to discuss, OTC safety education, and related RX articles.

Important: This tool is educational only. It cannot diagnose, treat, or replace a doctor. OTC information is not a prescription. In an emergency, contact local emergency services or go to the nearest hospital.

Doctor visit helper

Prepare before seeing a doctor

A simple rural-patient checklist to help you explain symptoms clearly, ask better questions, and avoid unsafe self-treatment.

Safety note: This is not a prescription or diagnosis. For severe symptoms, pregnancy danger signs, children with serious illness, chest pain, breathing difficulty, stroke-like weakness, or major injury, seek urgent care.

Which doctor may help?

Start with a registered doctor or the nearest qualified health center.

What to tell the doctor

  • Write when the problem started and how it changed.
  • Bring old prescriptions, investigation reports, and current medicines.
  • Write allergies, pregnancy status, diabetes, kidney/liver disease, and major past illnesses.
  • Bring one family member if the patient is weak, elderly, confused, or a child.

Questions to ask

  • What is the most likely cause of my symptoms?
  • Which danger signs mean I should go to hospital quickly?
  • Which tests are necessary now, and which can wait?
  • How should I take medicines safely and what side effects should I watch for?
  • When should I come for follow-up?

Tests to discuss

  • Vital signs: temperature, pulse, blood pressure, oxygen saturation
  • Basic physical examination by a clinician
  • CBC, urine test, blood sugar, or imaging only when clinically needed

Avoid these mistakes

  • Do not use antibiotics, steroid tablets/injections, or strong painkillers without proper medical advice.
  • Do not hide pregnancy, kidney disease, ulcer, allergy, or blood thinner use.
  • Do not delay emergency care when danger signs are present.

Medicine safety and first-aid guide

This section is for patient education only. It does not replace a doctor, pharmacist, or emergency care.

Safe first steps

  • Rest, drink safe water, and observe symptoms carefully.
  • Keep a written note of symptoms, duration, temperature, medicines already taken, and allergy history.
  • Seek medical care quickly if symptoms are severe, worsening, or unusual for the patient.

OTC medicine safety

  • For mild pain or fever, ask a registered pharmacist or doctor before using common over-the-counter pain/fever medicines.
  • Do not combine multiple pain medicines without advice, especially if you have kidney disease, liver disease, stomach ulcer, asthma, pregnancy, or take blood thinners.
  • Do not give adult medicines to children unless a qualified clinician advises it.

Avoid these mistakes

  • Do not start antibiotics without a proper medical decision.
  • Do not use steroid tablets or injections casually for quick relief.
  • Do not delay emergency care because of home remedies.

Get urgent help if

  • Severe symptoms, confusion, fainting, breathing difficulty, chest pain, severe dehydration, or sudden weakness need urgent medical care.
Medicine names, dose, and timing must be decided by a qualified clinician or pharmacist after checking age, pregnancy, allergy, other diseases, and current medicines.

For rural patients and family caregivers

Patient health record and symptom diary

Write your symptoms, medicines already taken, test results, and questions before visiting a doctor. This note stays on your device unless you print or copy it.

Doctor to discuss: Doctor / qualified healthcare provider
Tests to discuss with doctor
  • Basic vital signs: temperature, pulse, blood pressure, oxygen level if needed
  • Relevant blood, urine, imaging, or specialist tests only after clinical assessment
Questions to ask
  • What is the most likely cause of my symptoms?
  • Which warning signs mean I should go to emergency care?
  • Which tests are really needed now?
  • Which medicines are safe for my age, pregnancy status, allergy, kidney/liver/stomach condition, and current medicines?

Emergency warning signs such as chest pain, severe breathing difficulty, sudden weakness, confusion, severe dehydration, major injury, or loss of bladder/bowel control need urgent medical care. Do not wait for online information.

Safe pathway to proper treatment

Patient care roadmap

Use this simple roadmap to understand the next safe steps. It is educational and does not replace examination by a doctor.

Go to emergency care if you notice:
  • Severe or rapidly worsening symptoms
  • Breathing difficulty, chest pain, fainting, confusion, severe weakness, major injury, or severe dehydration
Doctor / service to discuss: Qualified healthcare provider; specialist depends on symptoms and examination.
  1. Step 1

    Check danger signs first

    If danger signs are present, seek emergency care and do not wait for online information.

  2. Step 2

    Record the symptom story

    Write when symptoms started, severity, medicines already taken, allergies, pregnancy status, and test results.

  3. Step 3

    Visit a qualified clinician

    A doctor, nurse, or qualified healthcare provider can examine you and decide which tests or treatment are needed.

  4. Step 4

    Do only useful tests

    Do tests after clinical assessment. Avoid unnecessary tests, random antibiotics, or repeated medicines without diagnosis.

  5. Step 5

    Follow up and return early if worse

    If symptoms worsen, new warning signs appear, or treatment is not helping, return for review quickly.

Rural patient practical tips
  • Take a written symptom diary and all previous prescriptions/test reports.
  • Do not hide medicines already taken, even herbal or over-the-counter medicines.
  • Ask which warning signs mean urgent referral to hospital.

This roadmap is for education. A real diagnosis and treatment plan requires history, examination, and clinical judgment.

RX Patient Help

Ask a health question safely

Write your symptom story. A health professional or site editor can review it before any answer is prepared. This box is not for emergency care.

Emergency first: Severe chest pain, breathing trouble, unconsciousness, stroke signs, severe injury, heavy bleeding, or rapidly worsening symptoms need urgent local medical care now.

Frequently Asked Questions

Passive profiling Concept Using this method, it's difficult to distinguish a normal user than an attacker. An idea is to analyse the number of application functionalities visited by user in a representative time frame. Normal user will only use a part of the application or will use the entire application but on an extended period (one week, one month…) but an attacker will visit as much functionalities as possible in a representative time frame. Take all the web application that you use in your personal/professional life, afterwards count how many functionalities do you use and for how long ? Interesting track to explore it is not ?Implementation The idea is to uniquely identify a HTTP request sender in order to trace is set of requests. There no "silver bullet" method here because IP can be spoofed and HTTP request can be easily forged but, using information for these sources, we can still catch a panel of attacker. As a skilled and motivated attacker cannot be stopped, the goal here is to raise the skill level required to play with the application. We will use the information below to identify sender:Sender IP address, HTTP request headers:Accept, Accept-Encoding, Accept-Language, Connection, User-Agent.We will use storage to keep information below:Digest of the HTTP request sender information above (used as unique ID), Identifier of the application functionality visited (URI for example), Last visit date time.We also need to know the list of functionality exposed by the application in order to perform comparison. This one can be stored into the same storage than information above. We will assume here that the representative time frame is two weeks. For each HTTP request, we will store the hit and next check if, for the last two weeks, the visitor has visited all the application functionalities. If it's the case then:We send all current request information (we send information here because in the store we only keep a digest) to a monitoring system in order to generate an alert and launch a review of the sender information in order to decide if aggressive defensive measure should be taken against them, We clean the store with the information of this sender (in order to avoid duplicate alert). Optionally it's possible to move information to archive storage type in order to perform global statistic processing for the application but it's not the goal here.See this class PassiveDetectionFilter for implementation details.Active profiling Concept When an attacker use this method it's a little much easier to detect the profiling behaviour. There several point into the application that can be checked for abnormal behaviour. One of them is the invalid value submitted into application form, indeed we can analyse (during input validation step) the number of invalid values submitted by a user into a functionality (bank transfer form for example). If the count of error is superior to an acceptable limit (three for example) we can assume that the visitor is playing with the application. This method is efficient but can lead to false positive in the case of some lubberly user. There another more subtle way to detect profiling by literally "phishing the attacker". In this method, we put some "honeypot" into the application. "Honeypot" are represented here into the form of a special custom cookie or custom HTTP header that sounds to be very interesting to the attacker. Theses cookies/headers are good place because a normal user will not modify theses (they are managed by the browser). An attacker will probably try to modify the value in order to check if the application behaves in different way and it’s at this point that we can detect the profiling.Implementation We will focus here on cookies area. The idea is to find, according to application context and functionalities provided, an interesting name and value for a cookie. We assume here that we want to detect profiling without requiring user to be authenticated and we also assume that there no real application session opened with the user. Like for "Passive" profiling, we will use some information from incoming HTTP request to uniquely identify a HTTP request sender in order to trace is set of requests. Expected value will be hard coded string in order to not impact application performance. The table below lists the name and value of the fake cookie that will be issued at first visitor request:Name Description Value Life Timeverbose_mode Simulate a flag that can enable development mode (verbose) of the application. false 1 daySee this class ActiveDetectionFilter for implementation details.We have detected a profiling phase then how application can defend itself?

There several way to apply counter measures against an attacker in order to bother them in their task and we can classify them according to their level of invasion on the client. Invasive measures are not legal but it's very rare that an attacker file a claim against is target. Level 1: Without invasion Simply block connection to application Close TCP/IP connection or block list IP address. Level 2: With invasion Gather information about attacker from is computer Run client…

References

Add references, clinical guidelines, textbooks, journal articles, or trusted medical sources here. You can edit this area from the RX Article Professional Blocks panel.