Monday, August 28, 2023

simulate loss and latency on networks,

there is was package called dummy net that would simulate loss and latency on networks, what is there like this for linux today? 

Dummynet was originally developed for FreeBSD to simulate various network properties like bandwidth limitations, latency, and packet loss. For Linux, there are a few tools that can be used to achieve similar network simulations. The most notable one is tc (Traffic Control), which is part of the iproute2 package.

Here's a brief overview of how you can use tc to simulate network conditions:

  1. Latency: To introduce a delay of 100ms on all outgoing packets on the interface eth0:

    bash
    tc qdisc add dev eth0 root netem delay 100ms
  2. Packet Loss: To simulate a 10% packet loss on the interface eth0:

    bash
    tc qdisc add dev eth0 root netem loss 10%
  3. Combine Latency and Packet Loss: To introduce both a delay of 100ms and a 10% packet loss:

    bash
    tc qdisc add dev eth0 root netem delay 100ms loss 10%
  4. Bandwidth Limitation: To limit bandwidth to, say, 1mbit:

    bash
    tc qdisc add dev eth0 root tbf rate 1mbit burst 32kbit latency 400ms
  5. Removing the rules: To remove the rules and return to normal:

    bash
    tc qdisc del dev eth0 root

Additionally, there are other tools and utilities, such as:

  • Comcast: It's a tool that allows you to simulate bad network connections, so you can test your applications under various conditions.

  • NetEm: It is actually an underlying tool (used in conjunction with tc) that allows you to introduce various network impairments like delay, loss, duplication, and reordering.

Always remember, if you're going to apply any of these changes to a live system, especially one serving real users or critical functions, take care to ensure you understand the implications and have a rollback plan. Also, testing in a controlled environment first is always a good idea.




https://wiki.linuxfoundation.org/networking/iproute2

https://github.com/shemminger/iproute2




Comcast

Testing distributed systems under hard failures like network partitions and instance termination is critical, but it's also important we test them under less catastrophic conditions because this is what they most often experience. Comcast is a tool designed to simulate common network problems like latency, bandwidth restrictions, and dropped/reordered/corrupted packets.

Thursday, August 03, 2023

Sun SPARC binaries back to C source code

from h2oGPT [Model: llama] 

Yes, it is possible to reverse compile Sun SPARC binaries back to C source code using a tool called "objdump". Objdump is a command-line utility that comes with most Unix-like operating systems and can be used to disassemble machine code into assembly code or source code.

Here's an example of how to use objdump to reverse compile a Sun SPARC binary:

  1. First, you need to find the binary file you want to reverse compile. Let's assume you have a binary file called "myprogram" that you want to reverse compile.
  2. Open a terminal and navigate to the directory where your binary file is located.
  3. Use the following command to disassemble the binary file into assembly code:
    objdump -D myprogram
    This will produce an assembly code file called "myprogram.s" that contains the assembly code for the binary program.
  4. To reverse compile the assembly code back to C source code, you can use a tool called "gas". Gas is a GNU assembler that can take assembly code as input and generate C source code as output.
    Use the following command to reverse compile the assembly code:
    gas -C myprogram.s -o myprogram.c
    This will produce a C source code file called "myprogram.c" that contains the original C source code for the program.
    Note: The -C option tells gas to generate C source code, and the -o option specifies the output file name.
  5. Finally, you can compile the C source code using a C compiler like GCC to produce an executable file.
    For example, you can use the following command:
    gcc -o myprogram myprogram.c
    This will produce an executable file called "myprogram" that runs the original program.
    It's worth noting that the reverse compilation process may not always work perfectly, especially if the binary code has been heavily optimized or obfuscated. In some cases, the resulting C source code may contain errors or be difficult to understand. Therefore, it's important to use objdump and gas with caution and only for educational or debugging purposes.

(ChatGPT4) - response to the above



I'm afraid there might be some misunderstanding here. objdump and gas do not work quite as described in your example. Allow me to clarify:

  • objdump is indeed a very powerful tool, but it's not a decompiler. It can disassemble binary code into assembly code, not into C source code. The assembly output can be used for further reverse-engineering tasks, but turning that into high-level C code is a much more complex task. There's no direct option in objdump to generate C source code from a binary or assembly.

  • gas, the GNU Assembler, is used to convert assembly language into machine code, not to convert assembly into C code. It cannot generate C code from assembly code.

There are decompilers available that attempt to generate high-level language code (such as C) from binary, but they are often complex to use, imperfect, and the output requires a fair amount of manual interpretation and reworking. For example, Ghidra, an open-source software reverse engineering suite developed by the NSA, includes decompiling capabilities.

Recompiling the decompiled C code also does not ensure the same functionality, as many details about the original implementation can be lost during the initial compile process (such as variable names, specific optimization decisions, etc.).

Please also note the legal and ethical implications of decompiling software, as I mentioned in my previous response.


ME: Are there Sparc decompilers by now?



As of my last training data in September 2021, there were no decompilers specifically designed for the SPARC architecture that could generate high-level C code. However, you may use disassemblers like objdump or radare2 to translate machine code into assembly instructions for analysis and understanding. For decompiling to higher level languages like C, one of the more powerful tools is Ghidra, developed by the National Security Agency (NSA) of the United States. Ghidra supports a wide range of processor instruction sets and executable formats, but you would need to check if it has updated to support the SPARC architecture specifically. Please remember that decompiling is a complex process and the output will not look like the original C code. Much information (such as variable names, comments, and specific structure of the original code) is lost during compilation, and won't be restored by decompilation. Moreover, remember the legal and ethical implications of decompiling software without explicit permission. Decompiling is considered a form of reverse engineering and can potentially infringe copyright laws or end-user license agreements.


Monday, March 20, 2023

Tiny Windows 10 & windows 11

 

Tiny10-21h2-x64,x86-NTDEV

Tiny10 21H2 2209 by NTDV

newer version of Tiny10 that includes Microsoft Edge and other features
includes both 64 bit and 32bit ISOs.

https://archive.org/details/tiny-10-21h2-x64-2209




https://www.youtube.com/watch?v=g8Bl6rUNx8w
A few months ago, we took a look at Tiny10, which was based off of Windows 10 Enterprise LTSC 2019. However, since then, NTDEV has released Tiny10 21H2, which is based off LTSC 2021. In this video, we'll be taking a look at Tiny10 21H2 and seeing how it compares to the original version.


https://twitter.com/NTDEV_/status/1505656808576372753  Download link are dead, get from Archive.org above.

This related to Tiny11. 

https://hackaday.com/2023/02/21/tiny11-makes-windows-11-small/

https://archive.org/details/tiny-11_202302


Youtube channel of guy who's building these. 

https://www.youtube.com/ntdev

Saturday, February 18, 2023

How did Elon Musk end up owning x.com?


I ran this through ChatGPT, so far it looks like it might be accurate. 


How did Elon Musk end up owning x.com?

In 1999, Elon Musk founded a company called X.com, which was an online payment company that eventually became PayPal. At that time, Musk was the majority shareholder and CEO of the company.

As part of the company's branding efforts, Musk wanted to secure the domain name X.com. He initially tried to buy it from its owner, a man named Jack Selby, but Selby wasn't interested in selling. Instead, Selby suggested that they play a game of "extreme poker" to determine who would get the domain name.

According to Musk, they played the game, and Musk won, which allowed him to take control of the X.com domain. Musk later sold PayPal to eBay for $1.5 billion in 2002, and he retained ownership of the X.com domain.

In 2017, Musk announced that he had reacquired the domain name X.com, but he has not yet announced any specific plans for how he intends to use it.

 

How did Jack Selby end up with X.com before Elon?

X.com was initially registered in 1987 by a software engineer named Elizabeth Feinler, who was responsible for assigning domain names and IP addresses at the time. The domain name was used for a variety of purposes over the years, including as an email service for members of the online community The WELL.

In the late 1990s, the domain name was acquired by a company called Confinity, which was co-founded by Max Levchin, Peter Thiel, and Luke Nosek. Confinity created a product called PayPal, which was an online payment system, and in 1999, the company was renamed PayPal.

Around this time, Jack Selby, who was an early PayPal employee and a friend of Elon Musk, became the manager of the X.com domain. Selby was responsible for maintaining the domain and managing its DNS records.

When Musk founded X.com in 1999, he wanted to use the X.com domain name for his new company, but it was already in use by PayPal. Musk eventually convinced Selby to transfer ownership of the X.com domain to him so that he could use it for his new venture.

Sunday, February 12, 2023

Tox, secure open source P2P communication


Decentralized Skype








Tox uses UDP for its underlying transport protocol. Tox was designed to be lightweight, fast, and secure, and using UDP helps to achieve these goals. Unlike TCP, which is a reliable transport protocol that requires that all packets be acknowledged, UDP is an unreliable protocol that does not guarantee delivery of packets. This means that packets can be lost or arrive out of order, but it also means that UDP is faster and less resource-intensive than TCP.

In Tox, the well-known servers that are used to start the initial communications are called bootstrap nodes. The bootstrap nodes are publicly accessible servers that are run by Tox community members and are used by Tox clients to join the Tox network and find other Tox clients.

When a Tox client starts up for the first time, it connects to one or more bootstrap nodes and uses them to join the Tox Distributed Hash Table (DHT). The DHT is a decentralized, distributed database that is used by Tox clients to find and connect to each other. Once the client has joined the DHT, it can use it to find other Tox clients and to publish its own IP address and public key so that other clients can find and connect to it.




Python3 client. 

Java Client. 

Tuesday, February 07, 2023

Decentralized Storage and p2p databases.



https://www.youtube.com/watch?v=AbvxEOG2EWU

Decentralized Storage Summit 2019 
Moderator: Raymond Cheng (former CTO at Oasis Labs) 
GunDB: Mark Nadal 
Textile: Carson Farmer 
Fluence: Dmitry Kurinskiy 
VulcanizeDB: Rick Dudley


https://gun.eco/
GunDB: GunDB ii an open-source, decentralized, NoSQL database, real-time, distributed database  that is written in JavaScript. It provides a simple and intuitive API for storing and retrieving data. GunDB is designed to be highly scalable, easy to use, and secure, making it a good choice for a wide range of applications, including social networks, messaging apps, and other real-time applications.

https://github.com/textileio/go-threads
https://docs.textile.io/threads/
Textile: Server-less p2p database built on libp2p. Textile is a decentralized, end-to-end encrypted, and peer-to-peer database that provides a simple and intuitive API for storing and retrieving data. Textile is designed to be highly secure, with end-to-end encryption, and is a good choice for applications that require a high degree of privacy and security, such as healthcare or financial applications.

https://fluence.network/
Fluence: Fluence is a decentralized, blockchain-based database that provides a simple and intuitive API for storing and retrieving data. Fluence is designed to be highly scalable, secure, and fast, making it a good choice for applications that require a high degree of reliability, such as financial applications.

https://github.com/vulcanize/vulcanizedb
VulcanizeDB: VulcanizeDB is a blockchain-based database that provides a simple and intuitive API for storing and retrieving data. VulcanizeDB is designed to be highly scalable, secure, and fast, making it a good choice for applications that require a high degree of reliability, such as financial applications.



OrbitDB: OrbitDB is an open-source, decentralized, NoSQL database that is built on top of IPFS. It uses a distributed peer-to-peer network to store and manage data, making it a highly scalable and secure option for decentralized applications. 



GUN vs. OrbitDB

GUN (Graph Universe Network) has been around since 2016 and is focused on providing a simple and intuitive API for building decentralized apps. It uses a novel data structure called the "Radix tree" for storing data, which enables GUN to handle large amounts of data and maintain a high level of performance even in decentralized scenarios. GUN is designed to be easy to use, and it doesn't require a deep understanding of blockchain technology.

OrbitDB is a database on IPFS (InterPlanetary File System), and it uses a distributed ledger technology (DLT) called IPDB (InterPlanetary Database) for data storage. OrbitDB provides a higher level of control over data storage, consistency, and versioning compared to GUN. OrbitDB is designed for more complex use cases, and it requires a deeper understanding of the underlying technology.



IPFS: IPFS (InterPlanetary File System) is a decentralized, peer-to-peer file storage network that is written in JavaScript. It allows users to store and share files on a distributed network, making it a secure and scalable option for decentralized applications. 

Accessing IPFS (InterPlanetary File System) does require a proxy server. IPFS is a decentralized peer-to-peer file storage network, and it doesn't have a centralized server to access its content. To access IPFS content, you need to use a gateway or a proxy server that acts as an intermediary between your client and the IPFS network.

There are several public IPFS gateways that you can use for free, such as ipfs.io, gateway.ipfs.io, and many others. These gateways allow you to access IPFS content by simply specifying the hash of the content in the URL. For example, you can access a file stored on IPFS using a URL like this: https://ipfs.io/ipfs/<hash>.

You can also run your own IPFS gateway if you need more control over the access to your IPFS content. This requires setting up an IPFS node and configuring it as a gateway. This option may be more suitable for applications that require more control over the access to the content, higher performance, or lower latency.





Beaker: Beaker is an open-source, decentralized browser that provides a built-in database for storing and retrieving data. It uses a peer-to-peer network to store and manage data, making it a highly scalable and secure option for decentralized applications.
Hi friends! This won't come as a huge shock, but the time has finally come that I archive the Beaker Browser repo. In 2022 I moved on to working at Bluesky, and, while the Beaker project is coming to an official end, the heart of Beaker continues with Bluesky. I hope the work we do will make Beaker's end a little less painful in the long run.