Sydney is deploying a high-tech system, dubbed Mousetrap, that literally sniffs out vandals on its rail network.
Sydney Trains CEO Howard Collins said the system "is what it says it does".
"It detects, covertly, people vandalising our trains," he said.
When a graffiti attack is taking place, a sensor in the carriage acts like an electronic nose, detecting the presence of paint fumes. An alarm is sent to the railway security office, where they can see live video of the offender in action.
The alarm even indicates whether a marker pen or paint is being used. Meanwhile, the rail network control room tracks the train's location while the crime is still taking place. Undercover police officers pounce and arrest the offender.
"This is a trial. We've been trialing this technology since late last year. It really has been successful. We've had over 70 instances of this kit being triggered. We've had 50 people being charged with offences. And as we roll it out now to other trains it's proving even more successful," Collins said.
A sensor is hidden in the wall of the train. When a marker pen or aerosol paint fumes come near it, a signal is sent to the digital processor, which analyses the chemical footprint of the fumes. When vapor levels match a known type of pen or paint, it sends the alarm.
Security technology firm Technique Risk developed Moustrap. CEO Mark Byers said the strength of the system was its ability for remote monitoring via a mobile phone.
"The information that they receive is the train or carriage number, the location the event is occurring and also where that train is going to," he said.
"One of the difficulties before this kit was available, often we only found the vandalism and graffiti when the train returned to the depot where they're repaired or cleaned," Collins said.
"But now we're building a profile of where and when these incidents occur. So the police already have the intelligence and the information to say, this is where this is likely to occur and this is the time of day."
Since Mousetrap began operating in Sydney, the number of offenders being caught has been far higher than authorities expected. Most of the city's trains are now graffiti-free, while the offenders are being stopped in their tracks.