Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Create records on a DWN

Once connected to the free DWN, this chapter will walk you through the process of creating records. You’ll learn the data structures involved, the syntax for record creation in JavaScript, and the best practices for ensuring data i…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Once connected to the free DWN, this chapter will walk you through the process of creating records. You’ll learn the data structures involved, the syntax for record creation in JavaScript, and the best practices for ensuring data integrity.



By the end of this chapter, you will have the skills needed to generate and store data effectively on your Decentralized Web Node.



You can use the create function to obtain records and from a DWN.






A recap,



Up to now our index.js file look as on the image bellow

Connect to web5 and dwn



Before writing our first code, let's explore different ways of creating records on a DWN





  • Create a text record



const { record: textRecord } = await web5.dwn.records.create({
data: "This is a text record",
message: {
dataFormat: "text/plain",
},
});







  • Create a json record



const { record: jsonRecord } = await web5.dwn.records.create({
data: {
content: 'This is the content',
description: 'Here we have a Json recod!',
},
message: {
dataFormat: 'application/json',
},
});






"Note: As we progress with creating images and files on the DWN, we will adjust our project settings and include one image and one file."


- add an image file and name it we5.png

- add a txt file and name it web5.txt

our work space should look as follow




Actual workspace



now create 2 variables in the index.js file to hold our image and text file




// index.js
//...

// Image file
const imageFile = new File(["test image content"], "web5.png", {
type: "image/png",
});
const mockImage = {
currentTarget: {
files: [imageFile], // Simulate a file input
},
};

// txt file
const txtFile = new File(["dummy content"], "web5.txt", {
type: "text/plain",
});

const mockTxt = {
currentTarget: {
files: [txtFile], // Mimic the file input's files array
},
};








  • Create Image record




const createBlobRecord = async (event) => {
const blob = new Blob(event.currentTarget.files, { type: "image/png" });
const { status, record } = await web5.dwn.records.create({
data: blob,
message: {
schema: "https://test.org/schema/image",
dataFormat: "image/png",
},
});

return record;
};

// Call the function and create the image on the DWN
createBlobRecord(mockImage).then((record) => {
console.log(record);
});








  • Create file record




const createFileRecord = async (event) => {
const file = event.currentTarget.files[0];
const { status: fileStatus, record: fileRecord } =
await web5.dwn.records.create({
data: file,
message: {
schema: "https://test.org/schema/file",
dataFormat: "application/json",
},
});

return fileRecord;
};

// Call the function and create the file on the DWN
createFileRecord(mockTxt).then((fileRecord) => {
console.log(fileRecord);
});








  • Create mixed record



Mixed record are record containing at the same time text, images, files, ...




const createMixedRecord = async (file, image, text) => {
const { status, record } = await web5.dwn.records.create({
data: {
image,
file,
text,
},
message: {
schema: "https://test.org/schema/mixed-data",
dataFormat: "application/json",
},
});

return record;
};

createMixedRecord(mockImage, mockTxt, "Mixed data");







  • Create a record form an existing record



You can create a new version of a record while maintaining a link to the version of the original record.




const { record: newVersionRecord } = await web5.dwn.records.createFrom({
record: originalRecord,
data: 'I am a new version of the original record!',
message: {
dataFormat: 'text/plain',
published: true,
},
});







  • Create a record with tags



You can assign tags to records to enable filtering by specific keywords




const { record } = await web5.dwn.records.create({
data: 'Chocolate Chip Cookies',
message: {
dataFormat: 'application/json',
tags: {
dishType: 'Dessert',
dietaryRestriction: 'Contains Gluten',
},
},
});






Note




  • when creating a record on a DWN you can choose to make it public or private. but it's private by default.

  • you can decide when to publish that record, directly or later. by default it's published directly



all you have to do is to add the following key into the message object when create a record




// .... 

const today = new Date();
const tomorrow = new Date(today);
tomorrow.setDate(today.getDate() + 1);

// Format the date and time in YYYY-MM-DDThh:mm:ss.ssssssZ format
const formattedDate = tomorrow.toISOString().replace(/\.\d{3}Z$/, '.000000Z');

{
// ....

message: {
// .....
published: true, // make public
datePublished: formattedDate // publish at a specific moment
},
}










Implementation in our project



For our project will proceed with the mixed data to have everything in simple json form



update the index.js file and add the following code




// index.js
// ...

// Image file
const imageFile = new File(["test image content"], "web5.png", {
type: "image/png",
});
const mockImage = {
currentTarget: {
files: [imageFile], // Simulate a file input
},
};

// txt file
const txtFile = new File(["dummy content"], "web5.txt", {
type: "text/plain",
});

const mockTxt = {
currentTarget: {
files: [txtFile], // Mimic the file input's files array
},
};

// Create Mixed record

const createMixedRecord = async (file, image, text) => {
const { status, record } = await web5.dwn.records.create({
data: {
image,
file,
text,
},
message: {
schema: "https://test.org/schema/mixed-data",
dataFormat: "application/json",
},
});

return record;
};

// run the function with data
createMixedRecord(mockImage, mockTxt, "Mixed data");







and ... Voilà



at this point your index.js file should look as bellow




import { Web5 } from "@web5/api";

const { web5, did } = await Web5.connect({
didCreateOptions: {
dwnEndpoints: ["https://dwn.gcda.xyz"], // Community DWN instance on Google Cloud
},
registration: {
onSuccess: () => {
console.log("\n\nConnected successfully");
},
onFailure: (error) => {
console.error("Connection failed:", error);
},
},
});

console.log("\nConnected did:", did);

// Image file
const imageFile = new File(["test image content"], "web5.png", {
type: "image/png",
});
const mockImage = {
currentTarget: {
files: [imageFile], // Simulate a file input
},
};

// txt file
const txtFile = new File(["dummy content"], "web5.txt", {
type: "text/plain",
});

const mockTxt = {
currentTarget: {
files: [txtFile], // Mimic the file input's files array
},
};

// Create Mixed record

const createMixedRecord = async (file, image, text) => {
const { status, record } = await web5.dwn.records.create({
data: {
image,
file,
text,
},
message: {
schema: "https://test.org/schema/mixed-data",
dataFormat: "application/json",
},
});

return record;
};

// run the function with data
createMixedRecord(mockImage, mockTxt, "Mixed data");






Good job so far






Next ⏩️ ⏩️ ⏩️ Query and Read records on a DWN






Prev ⏪️ ⏪️ ⏪️ Connect to Web5 and on a DWN

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Vulnerability Remediation & Verification
Syntax validiert (0 Fehler)
title: Detect Exploitation - Create records on a DWN
id: 91955671-bc8c-4a26-a0ea-f07c2907d8a5
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-25
logsource:
  category: network_connection
  product: any
detection:
  selection:
      DestinationHostname:
        - 'dwn.gcda.xyz'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-25"
        description = "YARA Signature for "
    strings:
        $str = "Create records on a DWN" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
(dest_host="dwn.gcda.xyz")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
destination.domain: ("dwn.gcda.xyz") and event.category: "network"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where DestinationHostName in ("dwn.gcda.xyz")
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

IoC Intelligence (1 Indikatoren)
dwn[.]gcda[.]xyz
CTI Threat Relationship Graph3 Knoten / 2 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Create records on a DWN.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Create records on a DWN

Thematisch verwandte Begriffe: Create, records · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97818 | phpIPAM through 1.8.3 has incorrect authorization for id=="admins" and i…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag