当前位置:首页 > 物联网 > 区块链
[导读] 近日据慢雾区情报显示,针对门罗币(XMR)转账锁定攻击在多个交易所出现,慢雾安全团队在收到情报第一时间进行分析跟进,本着负责任披露的原则我们第一时间在慢雾区进行了预警并为我们所服务的客户进行了及

近日据慢雾区情报显示,针对门罗币(XMR)转账定攻击在多个交易所出现,慢雾安全团队在收到情报第一时间进行分析跟进,本着负责任披露的原则我们第一时间在慢雾区进行了预警并为我们所服务的客户进行了及时的情报同步以及协助检测和修复。

攻击步骤

0x01:通过 monero-wallet-cli 输入密码登录钱包

0x02:通过命令发送锁定交易

0x03:转账完成,交易所未进行锁定交易(locked_transfer)检测,接收到被设置锁定区块高度才能解锁的币(可以理解为锁定了指定时间)。

0x04:恶意用户立即提币走人,留下交易所一脸懵逼。

造成影响

首先该攻击不会导致交易所任何资金损失,但是会锁定了交易所 XMR 流动性。

极端情况举例:如果交易所收到的都是需要锁定一年甚至更多年的门罗币则会导致一年内用户来提币的时候无币可以提(只能去购买额外的币来给用户提取)。

关于 locked_transfer 命令

monero-wallet-cli 关于 locked_transfer 命令解释如下:

locked_transfer [index=《N1》[,《N2》,。..]] [《priority》] [《ring_size》] (《URI》 | 《addr》 《amount》) 《lockblocks》 [《payment_id (obsolete)》]

转账命令:

locked_transfer FromAddress ToAddress 0.0101 20000

FromAddress:发送地址(一般为攻击者钱包地址)

ToAddress:接收地址(一般为交易所钱包地址)

0.0101:为转账金额

20000:为锁定区块数

如何防护

一般交易所会通过 get_transfers RPC 接口来解析 XMR 交易检测充值是否到账,在进行解析的时候只需要对 unlock_time 字段进行判断是否大于 0 则可以进行有效检测。

注:unlock_TIme 为 int 类型,如果大于 0 则意味着该交易有锁定区块,为恶意交易可以不予确认到账。为了避免充值不予到账损害“用户”利益可以进行另外一种处理:判断锁定区块是否到达,如果未到达则不予入账。

所有受影响 RPC 接口

(1)get_transfer

(2)get_bulk_payments

(3)show_transfer

(4)get_payments

同理:在其他地方使用了如上四个接口的地方也需要对 unlock_TIme 字段进行判断是否大于 0 ,大于 0 则不予充值到账。

该问题之前在 HackerOne 也有被白帽子提过漏洞赏金,其中门罗官方回复:

附:以下内容为官方文档摘录

get_transfers

Returns a list oftransfers.

Alias: None.

Inputs:

· in - boolean; (OpTIonal) Include incoming transfers.

· out - boolean; (OpTIonal) Include outgoing transfers.

· pending - boolean; (Optional) Include pending transfers.

· failed - boolean; (Optional) Include failed transfers.

· pool - boolean; (Optional) Include transfers from the daemon‘s transaction pool.

· filter_by_height - boolean; (Optional) Filter transfers by block height.

· min_height - unsigned int; (Optional) Minimum block height to scan for transfers, if filtering by height is enabled.

· max_height - unsigned int; (Opional) Maximum block height to scan for transfers, if filtering by height is enabled (defaults to max block height)。

· account_index - unsigned int; (Optional) Index of the account to query for transfers. (defaults to 0)

· subaddr_indices - array of unsigned int; (Optional) List of subaddress indices to query for transfers. (Defaults to empty - all indices)

Outputs:

· in array of transfers:

· address - string; Public address of the transfer.

· amount - unsigned int; Amount transferred.

· confirmations - unsigned int; Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed)。

· double_spend_seen - boolean; True if the key image(s) for the transfer have been seen before.

· fee - unsigned int; Transaction fee for this transfer.

· height - unsigned int; Height of the first block that confirmed this transfer (0 if not mined yet)。

· note - string; Note about this transfer.

· payment_id - string; Payment ID for this transfer.

· subaddr_index - JSON object containing the major & minor subaddress index:

major - unsigned int; Account index for the subaddress.

minor - unsigned int; Index of the subaddress under the account.

· suggested_confirmations_threshold - unsigned int; Estimation of the confirmations needed for the transaction to be included in a block.

· timestamp - unsigned int; POSIX timestamp for when this transfer was first confirmed in a block (or · timestamp submission if not mined yet)。

·txid - string; Transaction ID for this transfer.

·type - string; Transfer type: “in”

·unlock_time - unsigned int; Number of blocks until transfer is safely spendable.

·out array of transfers (see above)。

·pending array of transfers (see above)。

·failed array of transfers (see above)。

·pool array of transfers (see above)。

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d ’{“jsonrpc”:“2.0”,“id”:“0”,“method”:“get_transfers”,“params”:{“in”:true,“account_index”:1}}‘ -H ’Content-Type: application/json‘

{

“id”: “0”,

“jsonrpc”: “2.0”,

“result”: {

“in”: [{

“address”: “77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp”,

“amount”: 200000000000,

“confirmations”: 1,

“double_spend_seen”: false,

“fee”: 21650200000,

“height”: 153624,

“note”: “”,

“payment_id”: “0000000000000000”,

“subaddr_index”: {

“major”: 1,

“minor”: 0

},

“suggested_confirmations_threshold”: 1,

“timestamp”: 1535918400,

“txid”: “c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a”,

“type”: “in”,

“unlock_time”: 0

}]

}

}

get_payments

Get a list ofincoming payments using a given payment id.

Alias: None.

Inputs:

· payment_id - string; Payment ID used to find the payments (16 characters hex)。

Outputs:

· payments - list of:

· payment_id - string; Payment ID matching the input parameter.

· tx_hash - string; Transaction hash used as the transaction ID.

· amount - unsigned int; Amount for this payment.

· block_height - unsigned int; Height of the block that first confirmed this payment.

· unlock_time - unsigned int; Time (in block height) until this payment is safe to spend.

·subaddr_index - subaddress index:

major - unsigned int; Account index for the subaddress.

minor - unsigned int; Index of the subaddress in the account.

· address - string; Address receiving the payment; Base58 representation of the public keys.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d ’{“jsonrpc”:“2.0”,“id”:“0”,“method”:“get_payments”,“params”:{“payment_id”:“60900e5603bf96e3”}}‘ -H ’Content-Type: application/json‘

{

“id”: “0”,

“jsonrpc”: “2.0”,

“result”: {

“payments”: [{

“address”: “55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt”,

“amount”: 1000000000000,

“block_height”: 127606,

“payment_id”: “60900e5603bf96e3”,

“subaddr_index”: {

“major”: 0,

“minor”: 0

},

“tx_hash”: “3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f”,

“unlock_time”: 0

}]

}

}

get_bulk_payments

Get a list ofincoming payments using a given payment id, or a list of payments ids, from agiven height. This method is the preferred method over get_paymentsbecause it has the same functionality butis more extendable. Either is fine for looking up transactions by a singlepayment ID.

Alias: None.

Inputs:

· payment_ids - array of: string; Payment IDs used to find the payments (16 characters hex)。

· min_block_height - unsigned int; The block height at which to start looking for payments.

Outputs:

·payments - list of:

· payment_id - string; Payment ID matching one of the input IDs.

· tx_hash - string; Transaction hash used as the transaction ID.

· amount - unsigned int; Amount for this payment.

· block_height - unsigned int; Height of the block that first confirmed this payment.

·unlock_time - unsigned int; Time (in block height) until this payment is safe to spend.

· subaddr_index - subaddress index:

major - unsigned int; Account index for the subaddress.

minor - unsigned int; Index of the subaddress in the account.

· address - string; Address receiving the payment; Base58 representation of the public keys.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d ’{“jsonrpc”:“2.0”,“id”:“0”,“method”:“get_bulk_payments”,“params”:{“payment_ids”:[“60900e5603bf96e3”],“min_block_height”:“120000”}}‘ -H ’Content-Type: application/json‘

{

“id”: “0”,

“jsonrpc”: “2.0”,

“result”: {

“payments”: [{

“address”: “55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt”,

“amount”: 1000000000000,

“block_height”: 127606,

“payment_id”: “60900e5603bf96e3”,

“subaddr_index”: {

“major”: 0,

“minor”: 0

},

“tx_hash”: “3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f”,

“unlock_time”: 0

}]

}

}

get_transfer_by_txid

Show informationabout a transfer to/from this address.

Alias: None.

Inputs:

· txid - string; Transaction ID used to find the transfer.

· account_index - unsigned int; (Optional) Index of the account to query for the transfer.

Outputs:

·transfer - JSON object containing payment information:

·address - string; Address that transferred the funds. Base58 representation of the public keys.

·amount - unsigned int; Amount of this transfer.

·confirmations - unsigned int; Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed)。

·destinations - array of JSON objects containing transfer destinations:

·amount - unsigned int; Amount transferred to this destination.

·address - string; Address for this destination. Base58 representation of the public keys.

·double_spend_seen - boolean; True if the key image(s) for the transfer have been seen before.

·fee - unsigned int; Transaction fee for this transfer.

·height - unsigned int; Height of the first block that confirmed this transfer.

·note - string; Note about this transfer.

·payment_id - string; Payment ID for this transfer.

·subaddr_index - JSON object containing the major & minor subaddress index:

major - unsigned int; Account index for the subaddress.

minor - unsigned int; Index of the subaddress under the account.

·suggested_confirmations_threshold - unsigned int; Estimation of the confirmations needed for the transaction to be included in a block.

·timestamp - unsigned int; POSIX timestamp for the block that confirmed this transfer (or timestamp submission if not mined yet)。

·txid - string; Transaction ID of this transfer (same as input TXID)。

·type - string; Type of transfer, one of the following: “in”, “out”, “pending”, “failed”, “pool”

·unlock_time - unsigned int; Number of blocks until transfer is safely spendable.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d ’{“jsonrpc”:“2.0”,“id”:“0”,“method”:“get_transfer_by_txid”,“params”:{“txid”:“c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a”}}‘ -H ’Content-Type: application/json‘

{

“id”: “0”,

“jsonrpc”: “2.0”,

“result”: {

“transfer”: {

“address”: “55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt”,

“amount”: 300000000000,

“confirmations”: 1,

“destinations”: [{

“address”: “7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o”,

“amount”: 100000000000

},{

“address”: “77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp”,

“amount”: 200000000000

}],

“double_spend_seen”: false,

“fee”: 21650200000,

“height”: 153624,

“note”: “”,

“payment_id”: “0000000000000000”,

“subaddr_index”: {

“major”: 0,

“minor”: 0

},

“suggested_confirmations_threshold”: 1,

“timestamp”: 1535918400,

“txid”: “c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a”,

“type”: “out”,

“unlock_time”: 0

}

}

}

本站声明: 本文章由作者或相关机构授权发布,目的在于传递更多信息,并不代表本站赞同其观点,本站亦不保证或承诺内容真实性等。需要转载请联系该专栏作者,如若文章内容侵犯您的权益,请及时联系本站删除。
换一批
延伸阅读

北京2023年9月21日 /美通社/ -- 第23届中国国际工业博览会(以下简称:工博会)于2023年9月19-23日在上海国家会展中心隆重举行。作为全球工业领域最具影响力的展览会之一,本届工博会汇聚了众多国内外知名企业...

关键字: 控制系统 防护 软件 智能工厂

(全球TMT2023年9月7日讯)近期,华测检测认证集团股份有限公司(简称CTI华测检测)完成了对安徽风雪网络安全测评有限公司(简称风雪网安)的控股权收购;风雪网安就该股权收购交易向行业监管部门进行了报备,并成功通过了...

关键字: TI 网络安全 防护 MT

摩洛哥马拉喀什2023年3月10日 /美通社/ -- 第11届世界高速铁路大会(以下简称"世界高铁大会")落下帷幕。大会期间,华为面向全球首次亮相智能铁路周界防护解决方案,包括FRMCS(未来铁路移动...

关键字: 高铁 华为 铁路 防护

静电防护是指防止与管道终端相连的受油容器因静电引起爆燃事故而采取的防护措施。石油工业中的静电大多产生于油品在管道内的流动,油品沿管流动时管壁带有一种极性的电荷,油品则带有相反极性的电荷。

关键字: 静电 防护 电荷

巴塞罗那2023年3月1日 /美通社/ -- 在2023世界移动大会上(MWC2023),华为发布了业界首个基于“网络存储联动”的多层联动勒索攻击防护技术(MRP),同时,IDC 同步推出了《利用多层网络、存储和数据保护...

关键字: 防护 华为 数据中心 数据安全

济南2023年2月24日 /美通社/ -- 2月23日,在2023年中国网络和数据安全产业高峰论坛上,浪潮云洲荣获"铸网2022"工业互联网安全实网演练优秀防守实践企业,展示着锤炼工业安全全栈可信能力...

关键字: 全栈 防护 工业互联网 数据安全

济南2023年2月10日 /美通社/ -- 近日,工信部公布工业领域数据安全管理试点典型案例和成效突出地区名单,浪潮集团旗下浪潮云洲申报的云洲工业互联网平台数据安全管理方案顺利入选典型案例。 2021年12月,工信...

关键字: 数据安全 工业领域 防护 安全管理

北京2023年1月17日  /美通社/ -- 尚高公司(以下简称"尚高"或"公司";纳斯达克交易代码:SISI;一家中药材、有机农产品和其他生物科技产品生产及销售商),今...

关键字: BSP CE 防护 COM

郑州2023年1月6日 /美通社/ -- 全球领先的新能源客车制造商宇通客车股份有限公司(以下简称"宇通",上海证券交易所股票代码:600066)因在世界规模最大的足球赛事期间,为球迷提供安...

关键字: 电动客车 防护 新能源 安全系统

深圳2022年1月5日 /美通社/ -- 近日,为促进中国出口消费品质量安全的高质量、可持续发展,中国消费品质量安全促进会(以下简称“中消会”)和亚马逊在近日举办了...

关键字: 亚马逊 防护 研讨会 电子电气
关闭
关闭