
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
gitcode.com/shanliankun/openGauss-connector-go-pq.git
fork from github/lib/pq
go get gitcode.com/shanliankun/openGauss-connector-go-pq.git
When using original libpq go driver to access openGauss, the following error will be reported.
pq: Invalid username/password,login denied.
The reason is that openGauss default user connection password authentication method is sha256, which is a unique encryption method. Although openGauss configuration can be modified by the following methods to support native libpq connection.
Set the openGauss initialization parameter password_encryption_type.
alter system set password_encryption_type=0;
Set pg_hba.conf to allow md5 password verification: host all test 0.0.0.0/0 md5
Create a new user in database, then connect by this user.
We still prefer to use a more secure encryption method like sha256, so the modified libpq can be directly compatible with sha256.
database/sql
time.Time
correctly (i.e. timestamp[tz]
, time[tz]
, date
)bytea
)hstore
supportLISTEN
/NOTIFY
example multi_ip
postgres docsLIBPQ-MULTIPLE-HOSTS
postgres://gaussdb:secret@foo,bar,baz/mydb?sslmode=disable&target_session_attrs=primary&connect_timeout=1
postgres://gaussdb:secret@foo:1,bar:2,baz:3/mydb?sslmode=disable&target_session_attrs=primary&connect_timeout=1
user=gaussdb password=secret host=foo,bar,baz port=5432 dbname=mydb sslmode=disable target_session_attrs=primary connect_timeout=1
user=gaussdb password=secret host=foo,bar,baz port=5432,5432,5433 dbname=mydb sslmode=disable target_session_attrs=primary connect_timeout=1
import (
"database/sql"
_ "gitcode.com/shanliankun/openGauss-connector-go-pq.git"
)
func main() {
connStr := "host=127.0.0.1 port=5432 user=gaussdb password=test@1234 dbname=postgres sslmode=disable"
db, err := sql.Open("opengauss", connStr)
if err != nil {
log.Fatal(err)
}
var date string
err = db.QueryRow("select current_date ").Scan(&date)
if err != nil {
log.Fatal(err)
}
fmt.Println(date)
}
go test
is used for testing. See TESTS.md for more details.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.