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

Query and Read records on a DWN

With records created, it’s essential to know how to access them. In this chapter, we will explore the methods for querying and reading records from your DWN. You’ll learn how to formulate queries, handle responses, and parse data eff…

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

With records created, it’s essential to know how to access them. In this chapter, we will explore the methods for querying and reading records from your DWN. You’ll learn how to formulate queries, handle responses, and parse data efficiently using JavaScript.



This chapter will equip you with the techniques needed to retrieve and display information from your Decentralized Web Node, ensuring you can make the most of the data stored within.






Query Records



You can use the query function to obtain records and from a DWN of a specific person



as we still proceeding with our previous code, let query our DWN that contains our mixed record




// index.js
// ....

const response = await web5.dwn.records.query({
form: did,
message: {
filter: {
schema: "https://test.org/schema/mixed-data",
dataFormat: "application/json",
},
},
});

response.records.forEach(async (record) => {
const result = await record.data.json();
const allRecords = { recordId: record.id, data: result };
console.log(allRecords);
});







if your run the project at this point you'll get the response of your query what is an object containing all your record on your DWN and you'll realize that there is a new key recordId: record.id which will help us perform operations like read, update and delete a specific record,






Read Record



You can use the read function to obtain records and from a DWN. here is how :




// index.js
// ....
const { record: singleRecord } = await web5.dwn.records.read({
message: {
filter: {
recordId: "bafyreig4vibz5lg4otmftd56qzqisgga7cqw5yeob336z7nn2x3hyv55ha",
},
},
});

console.log(await singleRecord.data.json());






the result in the console should be as follow




{
image: { currentTarget: { files: [Array] } },
file: { currentTarget: { files: [Array] } },
text: 'Mixed data 2'
}






Okay, if you have been following allong, you code should look as the following :




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;
};

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


// Query records
const response = await web5.dwn.records.query({
form: did,
message: {
filter: {
schema: "https://test.org/schema/mixed-data",
dataFormat: "application/json",
},
},
});

response.records.forEach(async (record) => {
const result = await record.data.json();
const allRecords = { recordId: record.id, data: result };
console.log(allRecords);
});

// read record
const { record: singleRecord } = await web5.dwn.records.read({
message: {
filter: {
recordId: "bafyreig4vibz5lg4otmftd56qzqisgga7cqw5yeob336z7nn2x3hyv55ha",
},
},
});

console.log(await singleRecord.data.json());







Good job so far






Next ⏩️ ⏩️ ⏩️ Update and delete records on a DWN






Prev ⏪️ ⏪️ ⏪️ Create a record

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Vulnerability Remediation & Verification
Syntax validiert (0 Fehler)
title: Detect Exploitation - Query and Read records on a DWN
id: 9a2140b9-07a5-44a9-bdbf-a22b4b884c6f
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-27
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-27"
        description = "YARA Signature for "
    strings:
        $str = "Query and Read records on a DW" 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:

Analyse für identifizierte Bedrohung auf Basis von Live-CTI (ENISA EUVD): CVSS 0.0 · EPSS 0.0% · CISA KEV: nein. Handlungsableitung aus den verlinkten Hersteller-Quellen.

🛡️ 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.
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Query and Read records on a DWN

Thematisch verwandte Begriffe: Query, Read, 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 ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-100739 | A vulnerability was detected in mathurvishal CloudClassroom-PHP-Project…
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