-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send msg to an used/known address can damage the message channel? #10
Comments
Hi, Thank you for feedbacks. As explained in the article, MAM has a signature scheme to protect message chain from any spam message sent to the address already revealed. So, sending spam message to the address is allowed, but cannot be validated as valid message of the right channel owner(= seed owner), since only seed owner can generate correct Merkle Tree and its signature. In your code, you use same “seed” to publish message. That means attacker knows your seed to attack you channel. For IOTA, seed is to be ever protected in any circumstances and never to be revealed. So, your attack is caused not by defect in the architecture of MAM, but exposure of your channel seed to potential attackers. Try using different mam state with different seed when publishing:
Thank you. |
@abmushi thanks for the reply. However, even if the attacker is using a different seed, the channels looks have problem also. please see updated code at https://gist.github.com/linkcd/d87234a7a06c7cbb666c625e36fa1207 any suggestion/input is appreciated. |
Thank you. |
You were reading my mind :) According to a conversation I had with IOTA team (Lewis), MAM transaction or address are not normal IOTA transaction or address, therefor I assume they cannot be found by using tangle explorer. Besides MAM is only working with testnet, I am still waiting for it become available in mainnet. Before that, as you can see in the demo code, I am reading directly from tangle |
In addition, I heard that MAM tx does not require confirmation, which is an very interesting point. Again I need to wait for mainnet MAM become available to test this better |
You can test MAM in mainnet actually, because I did it. And MAM is stored as bundle of several transactions like normal transfer. I don't know maybe situation has changed...? You don't need your MAM bundle to be confirmed because structure of MAM bundle is different from that of Transfer bundle. And for your attack case scenario, I guess the problem is in API, not in a protocol, since current code seems to have some buggy behaviours... |
Thanks for the reply. It is interesting that you said MAM works on mainnet. I retested again but i cannot get the code with with my full node (ver 1.4.2.2) in mainnet. The error is When did you test MAM with mainnet? do u mind to share the code so i can try to run it? Which version the node in mainnet that you are talking to? |
I tested on mainnet on January. At that time IRI was 1.4.1.x, I guess. |
@abmushi is it possible for you to test one more time in mainnet? i followed your steps as i run the example code from I3wi's repo, and run it locally on the full node with localhost:YOURPORT, but got error such as @l3wi if you can also comment on this, it would be perfect thank you! |
my node info |
I tried using public node to attach to mainnet, since my fullnode is currently unsynced. You could find my MAM message in iotasear.ch https://iotasear.ch/address/BPAJ9FDHXFNQCQIHNQUWBTCXAXLNWTYZFKNDUIXYGQYVPLY9EGVRZOMKPMHGRRIRRUENYWLIBMGIQUPJK var Mam = require('../lib/mam.node.js')
var IOTA = require('iota.lib.js')
// public node
var iota = new IOTA({ provider: 'https://iotanode.us:443' })
// Initialise MAM State - PUBLIC
var mamState = Mam.init(iota)
// Publish to tangle
const publish = async packet => {
// Create MAM Payload - STRING OF TRYTES
var message = Mam.create(mamState, packet)
// Save new mamState
mamState = message.state
// Attach the payload.
console.log('Root: ', message.root)
console.log('Address: ', message.address)
await Mam.attach(message.payload, message.address)
// Fetch Stream Async to Test
var resp = await Mam.fetch(message.root, 'public', null, console.log)
console.log(resp)
}
publish('POTATO') |
Hello @abmushi , and it shows three transactions , have you any idea why? |
@abmushi thanks, that works. I guess i was working on a different version of mam lib :(
|
this tool is fun to work with it throws exception on the victim address i will dig more in next week, just fyi |
This tool is awesome! Thank you for your info. |
created and attacked the following adresses, to verify if the attacked tx cannot be verified
3.GUGQPTSTYMLMMGUBM9EGRYIHDQPKCCUKPAKZCQAXLQJNPFVVSKKFNAUDULTVWHHD9IRPGTTVQTYHVSGGC
|
It seems both valid tx and attacking tx are confirmed. So, validity of the MAM tx is not relevant to confirmation. |
Guys, I tried to use the same seed for multiple publisher to publish different data using MAM, and when I use the root to retrive the messages, something strange happened:the data obtained from the root is not deterministic! Sometimes it obtained the data of last time published from the root,sometimes it obtained the data of this time published from the SAME ROOT?Any idea with this??? |
Hi
i come across an issue that, if I manually send a message to an used/existing address, it looks like the channel is damaged, as the fetch method returns error.
The demo code can be found at https://gist.github.com/linkcd/72b08593b57ef39a576bf80f8390ea87
If this is true, then attacker can resend a new message to a known address, and damage the channel.
Based on test, this issue exists both in public channel and restricted channel. the only needed information is the address.
The text was updated successfully, but these errors were encountered: