Mayors and local councillors: protecting your municipality, your phone and your name
Hacked town hall mailboxes, fake transfer orders signed “the mayor”, fake Facebook accounts writing to residents, stolen WhatsApp accounts: a municipality is a target, whatever its size. Here are the documented threats, what the law expects of a mayor in France and Morocco, the “fake message from the mayor” sheet, the QasbaGuard level to choose for each device, and what a free tool can and cannot do.
Mayors, deputy mayors, councillors and council presidents
Your municipality speaks with your voice. Keep the keys.
The attacks that target town halls, what the law expects of you, and the right QasbaGuard level for each device.
A mayor is not targeted for their ideas, but for what they can do: sign, pay, speak on behalf of the municipality. An attacker who takes over their mailbox, their phone or their name can have money transferred, reassure residents with fake messages, or block town hall services for weeks.
This article is for mayors, deputy mayors, municipal councillors and presidents of communal councils, in France, Morocco and elsewhere, and for the town clerks who work with them. It takes no side. It answers a simple question: how to protect the municipality, its accounts and the councillor's phone without breaking electronic signatures or the town hall's software, and which QasbaGuard level to choose.
In figures
- 218incidents affecting local authorities handled by ANSSI in 2024, 30% of them hacked email accounts
- 58%of French local authorities use personal devices for council business; in 92% of these cases, it is the phone, according to Cybermalveillance.gouv.fr
- +262%in requests for help from local authorities about transfer fraud in 2025, according to Cybermalveillance.gouv.fr
Next: the five threats facing a municipality and its mayor, and the right move for each.
The five threats facing a municipality and its mayor
1. The town hall itself. In 2024, ANSSI, France's national cybersecurity agency, handled 218 incidents affecting local authorities, 14% of all its incidents. The most common type is the hacked email account (30%), ahead of attacks that flood a website to knock it offline; 25 incidents were ransomware, programs that encrypt files and demand a ransom, and most victims were municipalities. In early October 2025, most of the town hall services of Fumel, in south-west France, were brought to a halt by an attack. On 3 May 2026, the town hall of Quiberon, in Brittany, was hit by ransomware, later claimed by the Qilin group. Yet only 14% of French municipalities say they are well prepared for an attack, according to the 2024 survey by Cybermalveillance.gouv.fr.
2. The fake transfer order. In 2025, requests for help from local authorities about transfer fraud jumped by 262% on Cybermalveillance.gouv.fr. The scenario is well known: an email or message “from the mayor” asks the accountant for an urgent, discreet payment, or a fake supplier sends new bank details. It also works the other way: in February 2025, fake emails in the name of many municipalities sent “the town hall's new bank details” to local businesses and associations. It often starts with a hacked mailbox: the attacker reads the exchanges for weeks, then writes at the right moment, in the right tone.
3. Impersonating the mayor. Fake Facebook accounts in the mayor's name send private messages to residents: the municipality of Mantes-la-Ville reported it in 2025, as did Mont-Dore in New Caledonia and several municipalities in Mayotte. The messaging account on the phone is also targeted. On 20 March 2026, the French services grouped in the C4 (ANSSI, COMCYBER, DGA, DGSE and DGSI) warned about the theft of WhatsApp and Signal accounts belonging to political figures and elected officials. Two methods: a fake “support” asking for the code received by text message, or a fake QR code “to join the group” that actually links the account to the attacker's device. The attacker then reads the conversations and writes in the councillor's name.
4. Fake images and interference. During the campaign for the March 2026 municipal elections in France, candidates filed complaints over images or videos fabricated with artificial intelligence, notably in Guéret, Soustons and Corbeil-Essonnes. No fake voice of a mayor has been documented with certainty so far, but the technique exists. VIGINUM, the French agency that watches for foreign digital interference, identified four interference operations during these elections.
5. Harassment, all the way to the family. In France, 2,478 attacks on elected officials were recorded in 2025; 65% of the victims are mayors, and 27% of the attacks take place online (analysis centre of the Ministry of the Interior). According to the survey by the Association of French Mayors and Cevipof, 28% of mayors say they suffered at least one attack on social media during the year. Since the law of 21 March 2024, the councillor's family is better protected. Spreading information that makes it possible to find an elected official or their relatives, in order to expose them to danger, is punishable by up to five years in prison (article 223-1-1 of the Criminal Code). In February 2026, a Ministry of Justice circular asked prosecutors to also pursue the online harassment of candidates in the municipal elections.
The threats at a glance
One threat, one right move
Hacked mailbox
The threat
One stolen password, and the attacker reads the town hall's emails for weeks.
The right move
Two-factor authentication on every account, one account per person, passwords never shared.
Fake transfer
The threat
“The mayor” asks for an urgent payment, or a supplier changes bank details.
The right move
Call back on the usual number and use a code word agreed with the accountant.
Fake mayor account
The threat
A Facebook profile in your name writes to residents asking for money.
The right move
An official page everyone knows, a published warning, a quick report.
Stolen WhatsApp account
The threat
A fake “support” asks for the code, or a QR code links the account to an attacker.
The right move
PIN code, linked devices checked every week, never a QR code you received.
Fake image, harassment
The threat
A doctored image or your address circulates on social media.
The right move
Keep the evidence, family accounts private, report and file a complaint.
What the law expects of a mayor
In France. The mayor is, in practice, the controller of the municipality's files under the GDPR: civil registry, electoral rolls, payroll, school canteen. Processing personal data without the necessary security measures is punishable by five years in prison and a fine of 300,000 euros (article 226-17 of the Criminal Code). The emails and messages the mayor sends or receives about council business are public archives, even on a personal account: they must be kept and handed over to the municipality at the end of the term. And during an election period, a mayor who stands again may not use the town hall's files for the campaign, the CNIL reminds.
In Morocco. Law 05-20 on cybersecurity explicitly applies to local authorities. Each municipality must have an information security policy that complies with the directives of the national authority (the DGSSI), appoint a security officer and report its incidents. Law 09-08 protects residents' personal data, under the supervision of the CNDP. And under law 69-99, the municipality's documents are public archives whatever their medium: paper, email or message.
No public attack on a Moroccan municipality was found for 2024 to 2026. This reflects a lack of public sources, not an absence of risk. The context is heavy: in 2025, leaks hit the data of the CNSS (social security fund), then land registry data, and the DGSSI handled 879 incidents during the year. Communal elections are expected in 2027.
One rule for everyone: never delete messages. Not to free up space, not after a hack, not at the end of the term. They are the municipality's archives, and evidence if something happens.
The “fake message from the mayor” sheet
Prepare it now, with the town clerk or chief executive and the accountant.
- Always call back. Any request for a payment, a change of bank details or a sensitive document is checked by calling the usual number, never the one given in the message.
- A code word, agreed face to face between the mayor, the chief executive and the accountant, that no one writes in an email.
- A standard message to publish on the official page and the notice board: “The mayor will never contact you privately about money.”
- An official page residents know, listed on the municipality's website and in the newsletter, to quickly deny a fake message.
- Report fake accounts to the social network concerned, keeping screenshots as evidence.
Diagram
Real message from the mayor or impostor?
Checklist for the mayor and their team
These steps need no tool. They apply to the mayor, the deputy mayors and anyone who handles the municipality's accounts.
- A PIN code on WhatsApp and Signal, and linked devices checked every week (WhatsApp > Linked devices; Signal > Settings > Linked devices). Any unknown device is removed at once.
- Never a QR code you received by message, even from someone close, and never a code given to a “support”.
- Two-factor authentication by app or security key, not by text message, on the town hall mailbox, the Facebook page and the municipality's website.
- One account per person. No shared password for the municipality's page: each person has their own access, removed the day they leave.
- Council business on a council address, as far as possible, rather than on a personal mailbox.
- The phone locked with a code of at least six digits, and updated the same day.
- Personal and family accounts kept private: nothing that shows the house, the children's school or daily routines.
- An offline backup of the town hall, unplugged after each copy: it is what saves the municipality after ransomware.
- No message deleted, even an embarrassing one, even after a hack.
Which level to choose for each device
QasbaGuard offers four levels: 1 Balanced, 2 Hardened, 3 Paranoid and 4 Military. For a mayor, it all depends on who manages the device.
Infographic
Which level for which device
The town hall PC managed by a provider: audit only
The report goes to the provider or the IT department, who decide.
The town hall PC with no provider: decide together
The mayor and the town clerk read the audit; if they apply settings, Hardened at most, after a simulation.
The councillor's personal PC: Hardened
Little inconvenience: session locked after 10 minutes, open Wi-Fi joined manually.
The phone: Paranoid
It is almost always used for council business: unknown apps lose their powers, notifications hidden.
The Military level: not recommended
It would break electronic signatures and printing.
What changes day to day, plainly.
- Electronic signatures. The iParapheur signing platform, common in French town halls, uses LiberSign, a browser extension and a small program installed in the user's folder. At levels 1 to 3, QasbaGuard does not block them. At the Military level, Internet access switches to an allow list: LiberSign would be cut off. Smart-card signing keys (RGS certificates in France, Barid eSign in Morocco) are not storage drives: the Military level's USB storage block should not affect them, but none has been tested. Check on your own computer, in simulation first, with rollback available.
- Business software and Word templates. There is no public compatibility list for civil registry, election or payroll software. With Microsoft Defender, QasbaGuard enables rules that watch Office macros; at the Paranoid level, a macro that launches another program is blocked. After a deployment, open your usual templates and business software: if one of them is blocked, undo only the setting concerned.
- Projection in council meetings. At the Paranoid level, discovery of devices on the local network is turned off: casting to a network screen and automatic printer search may stop working. At the Military level, Bluetooth and printing are turned off. For a PC that projects in the council chamber, the Hardened level is a better fit.
- Printers. Since 2021, adding a printer requires administrator rights, with or without QasbaGuard: it is a Microsoft rule, which QasbaGuard keeps.
- USB sticks. At levels 1 to 3, they work (with Defender, an unsigned program launched from a stick is blocked). At the Military level, all removable storage is refused.
If a setting gets in your way, undo it on its own from the Restore menu and keep the rest. Always run a simulation before applying.
How QasbaGuard helps you
On your Windows PC.
- The audit, read-only, tells you whether the disk is encrypted, whether you work with an administrator account, whether the session locks by itself and whether Windows and your browsers are up to date. It spots 23 remote-control programs, often used by scammers, and flags traces of the “ClickFix” scam. Its report can be passed as it is to the provider.
- New in 5.10: the “managed device” safeguard. Before deploying, QasbaGuard detects a PC joined to a domain or to Microsoft Entra ID, enrolled in Intune or another MDM, an SCCM client or linked to a WSUS server. It then offers audit only, “this is my personal device” or stopping. This is the case for most town hall computers looked after by a provider or an inter-municipal body.
- The deployment closes the doors used by booby-trapped attachments: scripts received by email open in Notepad, Office macros from the Internet are blocked (business editions of Office), Windows credentials are protected in memory, and disk encryption is offered with its recovery key.
On your Android phone, connected to the PC by cable (adb).
- The audit reads the date of the latest security patch, spots apps installed outside the store that combine abnormal powers, and compares your apps with the public list of the Echap association: 638 known spyware and stalkerware apps.
- The deployment at the Paranoid level hides notifications on the lock screen and removes accessibility, overlay and notification access from unrecognised apps, asking you first.
- Every setting can be undone one by one, and none of your data is sent over the Internet.
What it does not do
QasbaGuard does not read inside WhatsApp or Signal: it does not see your linked devices, does not set your PIN code and does not spot a fake account in your name. It does not protect the municipality's Facebook page, does not check bank details, does not detect a doctored image and does not make the town hall compliant with the law: it replaces neither the provider, nor the data protection officer, nor a lawyer. It does not make backups. It changes nothing on an iPhone. And no signing key has been tested with it.
QasbaGuard does not replace your antivirus, it complements it: it closes the doors that Windows and Android leave open. Free, no account, no ads.
If something happens
Do not switch the device off, but disconnect it from the network (airplane mode, Wi-Fi off, cable unplugged), and delete nothing: the traces help understand what happened, and the messages remain municipal archives. Write down the time and what you saw. On a town hall computer, warn the provider first.
A transfer has gone out. Call the bank immediately to try to stop it, then file a complaint.
A fake account in your name. Publish the warning on the official page, report the account to the social network and keep screenshots.
In France: 17Cyber (17cyber.gouv.fr) and Cybermalveillance.gouv.fr for a hack or fraud, Pharos (internet-signalement.gouv.fr) for illegal content or online threats, the CNIL within 72 hours if personal data has leaked, then file a complaint.
In Morocco: the DGSSI and its maCERT watch centre (dgssi.gov.ma) for a cyberattack, to which law 05-20 requires incidents to be reported, and the CNDP on 3020 for a leak or misuse of personal data.
This page was translated with AI. If in doubt, the French version prevails.
Key points
Before the next council meeting
- PIN code on WhatsApp and Signal, linked devices checked every week.
- Call back and use a code word for any payment or change of bank details.
- “The mayor will never contact you privately about money”, published on the official page.
- Town hall PC: audit only, report to the provider.
- Personal PC at the Hardened level, phone at the Paranoid level, never Military.
- No message deleted: they are the municipality's archives.
QasbaGuard checks and hardens the councillor's PC and phone, and looks for the 638 known spyware apps. Free, no account.