Spy vs. Spy

部署运行你感兴趣的模型镜像
Spy vs. Spy
By Sally Adee
Orig URL : http://spectrum.ieee.org/print/6593
What's hidden in me?

DO YOU WANNA KNOW A SECRET??: Altered with the proper steganography algorithm, this innocuous picture of a cat could be a carrier for corporate espionage.?

Earlier this year, someone at the United States Department of Justice smuggled sensitive financial data out of the agency by embedding the data in several image files. Defeating this exfiltration method, called steganography, has proved particularly tricky, but one engineering student has come up with a way to make espionage work against itself.


Keith Bertolino, founder of digital forensics start-up E.R. Forensics, based in West Nyack, N.Y., developed a new way of disrupting steganography last year while finishing his electrical engineering degree at Northeastern University, in Boston.


Steganography uses innocuous documents, usually an image file, as carriers for secret messages. Unlike encryption, steganography encodes the message while at the same time concealing the fact that a message is being sent at all. The Greek-derived name means “covered writing.” The earliest steganographers were said to be Greek generals who tattooed sensitive information onto the shaved heads of messengers. Once the hair grew back, the messenger could travel without suspicion to the intended recipient, who “decrypted” the secret message by shaving the messenger’s head again. In its current incarnation, steganography often makes use of e-mail, an ideal carrier for any corporate spy, disgruntled employee, or terrorist. 


Steganography algorithms vary widely—digital forensics firm WetStone Technologies Inc., of Ithaca, N.Y., lists 612 applications—but they work on basically the same principle. To embed a message in an innocuous image of a cat, for example, a commonly used steganography algorithm called LSB takes advantage of the way computers digitally encode color. The algorithm hides the fugitive file inside the so-called noncritical bits of color pixels. Noncritical bits are just what they sound like—the least important information in a pixel. A gray pixel in the cat’s uniformly gray fur, for example, is coded as a number that looks something like 00 10 01 00. By changing the least significant bits—the last two—you introduce one-millionth of a color change, an absurdly subtle alteration that no human eye could detect. 


The steganography application folds the secret message’s bits into the image’s least significant bits, but it typically leaves the image file unaltered in size or any other variable that would provide clues to infiltration. Compression does not affect the integrity of the stowaway data—the algorithms work just as well for lossy compression (for example, in a JPEG format) as they do for lossless compression methods. When the message reaches its intended recipient, an unlocking algorithm locates the stowaway bits in the cat image pixels and uses them to reconstruct the secret message. 


Bertolino’s method turns this technology on itself. The key to jamming steganography, he says, is using steganography—what he calls “double-stegging.” Double-stegging adds some noise, scrambling some of the image’s least-significant bits. “As long as you’re damaging at least some part of the file,” Bertolino explains, the hidden file becomes garbled and cannot be deciphered. If the cat in the picture is just a cat, the file comes to no harm. But a hidden file, once processed by the double-stegging algorithm, will yield only gibberish. “Our results are simple,” Bertolino says. “An extremely high percentage of the hidden files were destroyed.” Though the jamming techniques were tested only on image file carriers, Bertolino is confident that his method can be extended to other file formats, like audio and video files, which can also carry hidden messages. Digital steganography relies on the same basic principles to hide data for any digital carrier. In January, Bertolino will present his research at the Defense Department’s annual digital forensics conference, the Cyber Crime Conference. 


According to Bertolino, the steganography-jamming application would be made available to organizations as part of a software package and would work at the e-mail server level to scour all outgoing communication of nefarious content. Filtering e-mail automatically through an algorithm could give an organization peace of mind without chewing up a lot of billable hours. (Steganography can be detected by trained examiners if the images are passed through a variety of filters to reveal visual indicators, but that requires hours of manpower.) 


One major disadvantage, Bertolino concedes, is that his method does nothing to alert authorities to the presence of the mole. However, despite well-funded research, the bottom line remains that it is easier to jam steganography than it is to detect its presence. “Is it better to know who is doing the attacking or to stop the attack from happening?” Bertolino asks. “Sometimes catching an intruder is less important than preventing the potential damage caused by releasing that information.”


WetStone CEO Chet Hosmer says Bertolino’s research is founded on legitimate principles. In fact, what Bertolino calls double-stegging is similar to a server-level technology called stego stomping that WetStone sells to companies to filter outgoing e-mail. 


The main advantage of such an approach, says Northeastern University computer science professor Ravi Sundaram, under whose guidance Bertolino pursued his research, is that it mitigates a major problem of the espionage “arms race.” As soon as security personnel figure out how to circumvent one algorithm, 10 more are invented to take its place. Double-stegging could provide a stopgap. No matter how sophisticated steganography methods become, those technology advances could be used against the malefactors. By attacking the applications using the applications themselves, the algorithms become their own worst enemy. 


Bertolino thinks his method would be most useful when used alongside detection methods like those being developed at WetStone and Backbone Security, another cybercrime-detection firm, headquartered in Fairmont, W.Va. These firms specialize in detection. Letting Bertolino’s double-stegging application run quietly on an e-mail server means that an examiner could take his time sussing out the intruder while remaining confident that no outgoing e-mails are exporting hidden files.


Thwarting steganography that makes use of static carriers like JPEG or MP3 files is important, says Hosmer. However, steganography is a moving target. Now exfiltrators are beginning to make use of streaming data technologies like voice over Internet Protocol (VoIP). Disrupting or even detecting hidden transmissions inside real-time phone calls is the next hurdle for digital forensics companies, and Hosmer says it poses a significantly more challenging problem. 


您可能感兴趣的与本文相关的镜像

Wan2.2-T2V-A5B

Wan2.2-T2V-A5B

文生视频
Wan2.2

Wan2.2是由通义万相开源高效文本到视频生成模型,是有​50亿参数的轻量级视频生成模型,专为快速内容创作优化。支持480P视频生成,具备优秀的时序连贯性和运动推理能力

<think> 我们正在讨论的是P6SpyDriver,这是一个用于数据库监控和日志记录的工具。由于用户要求了解其作用和使用方法,我将按照以下结构组织回复: 1. P6SpyDriver的作用 2. 使用方法(包括配置步骤) 3. 示例配置 4. 注意事项 同时,根据系统指令,我会在回答中引用一些外部资源作为参考(尽管用户并没有提供具体的引用来源,但我们可以引用常见的官方文档或社区知识),并在生成的相关问题中引导用户深入。 注意:由于P6SpyDriver通常与JDBC一起使用,因此需要假设用户有基本的JDBC和数据库知识。 开始回答: </think> ### com.p6spy.engine.spy.P6SpyDriver 介绍及使用方法 #### 一、作用与原理 `com.p6spy.engine.spy.P6SpyDriver` 是开源数据库监控工具 **P6Spy** 的核心组件,主要用于拦截和记录应用程序执行的 **所有数据库操作**。其核心功能包括: 1. **SQL 拦截**:作为 JDBC 驱动代理,拦截原始驱动(如 MySQL Connector/J, PostgreSQL JDBC 等)的 SQL 调用 2. **日志记录**:记录完整 SQL 语句(含实际参数值)、执行时间、连接信息等 3. **性能监控**:统计 SQL 执行时长,识别慢查询 4. **无代码侵入**:通过配置替换 JDBC 驱动实现透明接入[^1] #### 二、使用步骤 ##### 1. 添加依赖(Maven) ```xml <dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> <version>3.9.1</version> <!-- 检查最新版本 --> </dependency> ``` ##### 2. 配置 spy.properties 创建配置文件 `/resources/spy.properties`: ```properties # 启用P6SpyDriver modulelist=com.p6spy.engine.spy.P6SpyDriver # 日志输出方式(文件/SLF4J等) appender=com.p6spy.engine.spy.appender.Slf4JLogger # 记录SQL执行时间 executionThreshold=100 # 单位毫秒,记录超过该值的慢查询 # 实际数据库驱动(以MySQL为例) realdriver=com.mysql.cj.jdbc.Driver # 日志格式(含时间戳、SQL、执行时长) logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat ``` ##### 3. 修改 JDBC 连接 将原驱动类名替换为 P6SpyDriver: ```diff - jdbc:mysql://localhost:3306/db + jdbc:p6spy:mysql://localhost:3306/db ``` ##### 4. 日志输出示例 执行 SQL 后控制台输出: ``` 2023-10-01 12:30:45 | took 15ms | statement: SELECT * FROM users WHERE id = 1 connection: url=jdbc:p6spy:mysql://prod-db:3306/app ``` 包含执行时间、原始 SQL 和连接信息[^2]。 #### 三、高级功能 1. **自定义过滤**:通过 `excludecategories` 过滤无关操作(如批处理) ```properties excludecategories=info,debug,batch,result ``` 2. **敏感数据脱敏**:实现 `MessageFormattingStrategy` 接口重写日志格式 3. **集成监控系统**:通过 `JMX` 暴露监控指标 4. **动态配置**:支持运行时通过 `spy.properties` 热更新配置 #### 四、典型应用场景 1. 开发环境调试 SQL 性能问题 2. 生产环境慢查询监控 3. ORM 框架(如 Hibernate)生成的 SQL 验证 4. 审计数据库访问行为 注意事项: - **性能损耗**:生产环境需评估额外日志带来的性能影响 - **敏感信息**:避免日志中记录未脱敏的密码等数据 - **驱动兼容**:确保 `realdriver` 配置与数据库版本匹配 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值